@seasketch/geoprocessing
Version:
Geoprocessing and reporting framework for SeaSketch 2.0
14 lines • 563 B
JavaScript
/**
* Type narrowing to allow property checking when object can be multiple types
* https://fettblog.eu/typescript-hasownproperty/
* Any code inside a block guarded by a conditional call to this function will have type narrowed to X
*/
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export function hasOwnProperty(obj, prop) {
// eslint-disable-next-line no-prototype-builtins
return obj.hasOwnProperty(prop);
}
export function isObject(val) {
return val ? typeof val === "object" : false;
}
//# sourceMappingURL=native.js.map