@aedart/contracts
Version:
The Ion contracts package. Contains types, interfaces and unique identifiers
39 lines (34 loc) • 1.12 kB
JavaScript
/**
* @aedart/contracts
*
* BSD-3-Clause, Copyright (c) 2023-present Alin Eugen Deac <aedart@gmail.com>.
*/
;
/**
* Default maximum merge depth
*
* @type {number}
*/
const DEFAULT_MAX_MERGE_DEPTH = 512;
/**
* Support Objects identifier
*
* @type {Symbol}
*/
const SUPPORT_OBJECTS = Symbol('@aedart/contracts/support/objects');
/**
* Properties that are considered dangerous and should be avoided when merging
* objects or assigning properties.
*
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf#description
* @see https://cheatsheetseries.owasp.org/cheatsheets/Prototype_Pollution_Prevention_Cheat_Sheet.html
* @see https://medium.com/@king.amit95/prototype-pollution-a-deeper-inspection-82a226796966
*
* @type {PropertyKey[]}
*/
const DANGEROUS_PROPERTIES = ['__proto__'];
exports.DANGEROUS_PROPERTIES = DANGEROUS_PROPERTIES;
exports.DEFAULT_MAX_MERGE_DEPTH = DEFAULT_MAX_MERGE_DEPTH;
exports.SUPPORT_OBJECTS = SUPPORT_OBJECTS;
module.exports = Object.assign(exports.default, exports);
//# sourceMappingURL=objects.cjs.map