forked from orbit-oss/is
Add is.nodeStream() (#34)
This commit is contained in:
parent
ae3adc9818
commit
a04a04c131
4 changed files with 38 additions and 1 deletions
|
|
@ -238,6 +238,8 @@ namespace is { // tslint:disable-line:no-namespace
|
|||
export const domElement = (value: any) => object(value) && value.nodeType === NODE_TYPE_ELEMENT && string(value.nodeName) &&
|
||||
!plainObject(value) && DOM_PROPERTIES_TO_CHECK.every(property => property in value);
|
||||
|
||||
export const nodeStream = (value: any) => !nullOrUndefined(value) && isObject(value) && function_(value.pipe);
|
||||
|
||||
export const infinite = (value: any) => value === Infinity || value === -Infinity;
|
||||
|
||||
const isAbsoluteMod2 = (value: number) => (rem: number) => integer(rem) && Math.abs(rem % 2) === value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue