Merge branch 'master' into add-is-gen

This commit is contained in:
Kunall Banerjee 2017-09-24 16:01:36 -04:00
commit bd72dbd1e5
3 changed files with 19 additions and 1 deletions

View file

@ -134,11 +134,13 @@ is.plainObject = x => {
// eslint-disable-next-line no-return-assign
return getObjectType(x) === 'Object' &&
(prototype = Object.getPrototypeOf(x), prototype === null ||
prototype === Object.getPrototypeOf({}));
prototype === Object.getPrototypeOf({}));
};
is.iterable = x => !is.null(x) && !is.undefined(x) && typeof x[Symbol.iterator] === 'function';
is.class = x => typeof x === 'function' && x.toString().startsWith('class ');
const typedArrayTypes = new Set([
'Int8Array',
'Uint8Array',