Add is.nodeStream()

This commit is contained in:
Brandon Smith 2017-11-19 14:57:27 -05:00
parent 319982a09c
commit 667506ef81
4 changed files with 38 additions and 1 deletions

View file

@ -186,6 +186,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;