🔨 changes
This commit is contained in:
parent
bd72dbd1e5
commit
83e48df329
3 changed files with 9 additions and 6 deletions
4
index.js
4
index.js
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue