3 const { common
} = require('@squeep/api-dingus');
7 * Recursively freeze an object.
11 const freezeDeep
= (o
) => {
13 Object
.getOwnPropertyNames(o
).forEach((prop
) => {
14 if (Object
.hasOwnProperty
.call(o
, prop
)
15 && ['object', 'function'].includes(typeof o
[prop
]) // eslint-disable-line security/detect-object-injection
16 && !Object
.isFrozen(o
[prop
])) { // eslint-disable-line security/detect-object-injection
17 return freezeDeep(o
[prop
]); // eslint-disable-line security/detect-object-injection
23 module
.exports
= Object
.assign(Object
.create(common
), {