updating is.boolean method

According to [this comment](https://github.com/sindresorhus/is/pull/12#issuecomment-334327363) comparing variable to boolean values `true` and `false` manually is faster than using `typeof` so I'm changing the function for a faster results
This commit is contained in:
Khaled Al-Ansari 2017-10-05 16:41:03 +03:00 committed by GitHub
parent 24c964a7c7
commit 1ad87e2867

View file

@ -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 = (value) => value === true || value === false;
is.symbol = isOfType('symbol');
is.array = Array.isArray;