sussy-util
Version:
Util package made by me
16 lines (15 loc) • 566 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const Classes_1 = require("../Classes");
/**
* Checks if the given object has a property with the specified name.
*
* @param {Object} obj - The object to check for the property.
* @param {string} prop - The name of the property to check.
* @returns {boolean} True if the object has the property, false otherwise.
*/
exports.default = (obj, prop) => {
if (!Classes_1.IsSomething.isString(prop))
return false;
return Object.prototype.hasOwnProperty.call(obj, prop);
};