🔨 changes

This commit is contained in:
Kunall Banerjee 2017-09-26 18:18:28 -04:00
parent bd72dbd1e5
commit 83e48df329
3 changed files with 9 additions and 6 deletions

View file

@ -81,9 +81,9 @@ is.promise = x => {
);
};
is.generator = x => x && typeof x.next === 'function' && typeof x.throw === 'function';
is.generator = x => is.iterable(x) && is.function(x.next) && is.function(x.throw);
is.generatorFunction = x => x.constructor.name === 'GeneratorFunction';
is.generatorFunction = x => getObjectType(x) === 'GeneratorFunction';
is.regExp = x => getObjectType(x) === 'RegExp';
is.date = x => getObjectType(x) === 'Date';