@appsemble/utils
Version:
Utility functions used in Appsemble internally
11 lines • 429 B
JavaScript
/**
* Check if the target has an own property named after the key.
*
* @param target The target that should have the key. Null values are also accepted.
* @param key The key to check for on the target.
* @returns Whether or not the key exists on the target.
*/
export function has(target, key) {
return target != null && target !== undefined && Object.hasOwnProperty.call(target, key);
}
//# sourceMappingURL=has.js.map