UNPKG

moltres-utils

Version:
41 lines (37 loc) 1.31 kB
"use strict"; require("core-js/modules/es6.object.define-property"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var hasOwnProperty = Object.prototype.hasOwnProperty; /** * Returns a boolean indicating whether the object has the specified property as its own property (as opposed to inheriting it). * * See [Object.hasOwnProperty()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty) for more information * * @function * @since v0.0.18 * @category lang * @param {object} object The object on which to check for the property. * @param {string} prop The String name or symbol of the property to test. * @returns {boolean} A boolean indicating whether or not the object has the specified property as own property. * * const object = new Object() * object.property1 = 42 * * objectHasOwnProperty(object, 'property1') * //=> true * * objectHasOwnProperty(object, 'toString') * //=> false * * objectHasOwnProperty(object, 'hasOwnProperty') * //=> false */ var objectHasOwnProperty = function objectHasOwnProperty(object, prop) { return hasOwnProperty.call(object, prop); }; var _default = objectHasOwnProperty; exports.default = _default; //# sourceMappingURL=objectHasOwnProperty.js.map