Merge branch 'master' into master_add_domElement

This commit is contained in:
Melvin Philips 2017-10-05 14:02:00 -07:00
commit b22d9e88db
4 changed files with 24 additions and 4 deletions

View file

@ -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;