Spaces:
Paused
Paused
File size: 284 Bytes
9ada4bc |
1 2 3 4 5 6 7 8 9 |
/**
* Determines if a given value is an instance of object.
*/
export function isObject<T>(value: any, loose = false): value is T {
return loose
? Object.prototype.toString.call(value).startsWith('[object ')
: Object.prototype.toString.call(value) === '[object Object]'
}
|