ottoman
Version:
Ottoman Couchbase ODM
17 lines • 655 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.nonenumerable = void 0;
/**
* Set a given property of the target to be non-enumerable
* Will not be listed on Object.keys and will be excluded by spread operator
*/
const nonenumerable = (target, propertyKey) => {
const descriptor = Object.getOwnPropertyDescriptor(target, propertyKey) || {};
if (descriptor.enumerable !== false) {
descriptor.enumerable = false;
descriptor.writable = true;
Object.defineProperty(target, propertyKey, descriptor);
}
};
exports.nonenumerable = nonenumerable;
//# sourceMappingURL=noenumarable.js.map