Merge branch 'master' into master_add_domElement
This commit is contained in:
commit
b22d9e88db
4 changed files with 24 additions and 4 deletions
6
index.js
6
index.js
|
|
@ -7,7 +7,7 @@ const isOfType = type => x => typeof x === type; // eslint-disable-line valid-ty
|
|||
const isObjectOfType = type => x => getObjectType(x) === type;
|
||||
|
||||
const is = value => {
|
||||
if (value == null) { // eslint-disable-line no-eq-null, eqeqeq
|
||||
if (value === null) {
|
||||
return 'null';
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ is.undefined = isOfType('undefined');
|
|||
is.null = x => x === null;
|
||||
is.string = isOfType('string');
|
||||
is.number = isOfType('number');
|
||||
is.boolean = isOfType('boolean');
|
||||
is.boolean = x => x === true || x === false;
|
||||
is.symbol = isOfType('symbol');
|
||||
|
||||
is.array = Array.isArray;
|
||||
|
|
@ -168,4 +168,6 @@ is.domElement = x => {
|
|||
!is.plainObject(x) && propsToCheck.every(prop => prop in x);
|
||||
};
|
||||
|
||||
is.infinite = x => x === Infinity || x === -Infinity;
|
||||
|
||||
module.exports = is;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue