@rws-air/utils
Version:
Utilities for rws-air libraries and applications
17 lines • 726 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.objectHasProperty = void 0;
const util_1 = require("util");
function objHasProp(obj, prop) {
return obj && prop in obj;
}
/**
* Type safely checks if an object includes a given property without using the prototype
* @param obj Object to analyze
* @param prop Property to check for
* @deprecated use Reflect API instead
* @example Reflect.has(obj, prop)
* @example objectHasProperty(obj, prop)
*/
exports.objectHasProperty = (0, util_1.deprecate)((...args) => objHasProp(args[0], args[1]), 'objectHasProperty is deprecated, use Reflect API with "Reflect.has(obj, \'prop\')" instead.');
//# sourceMappingURL=ObjectHasProperty.js.map