Rebase branch
This commit is contained in:
parent
19c5359b28
commit
e50162b58e
2 changed files with 1 additions and 14 deletions
|
|
@ -48,8 +48,7 @@ export const enum TypeName {
|
|||
ArrayBuffer = 'ArrayBuffer',
|
||||
SharedArrayBuffer = 'SharedArrayBuffer',
|
||||
DataView = 'DataView',
|
||||
Promise = 'Promise',
|
||||
URL = 'URL'
|
||||
Promise = 'Promise'
|
||||
}
|
||||
|
||||
const toString = Object.prototype.toString;
|
||||
|
|
@ -178,7 +177,6 @@ namespace is { // tslint:disable-line:no-namespace
|
|||
export const dataView = isObjectOfType<DataView>(TypeName.DataView);
|
||||
|
||||
export const directInstanceOf = <T>(instance: any, klass: Class<T>): instance is T => Object.getPrototypeOf(instance) === klass.prototype;
|
||||
export const urlInstance = (value: any): value is URL => isObjectOfType<URL>(TypeName.URL)(value);
|
||||
|
||||
export const truthy = (value: any) => Boolean(value);
|
||||
export const falsy = (value: any) => !value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue