(object)
| 17 | } |
| 18 | |
| 19 | function deepFreezeObject (object) { |
| 20 | const properties = Object.getOwnPropertyNames(object) |
| 21 | |
| 22 | for (const name of properties) { |
| 23 | const value = object[name] |
| 24 | |
| 25 | if (ArrayBuffer.isView(value) && !(value instanceof DataView)) { |
| 26 | continue |
| 27 | } |
| 28 | |
| 29 | object[name] = value && typeof value === 'object' ? deepFreezeObject(value) : value |
| 30 | } |
| 31 | |
| 32 | return Object.freeze(object) |
| 33 | } |
| 34 | |
| 35 | module.exports = validateInitialConfig |
| 36 | module.exports.defaultInitOptions = validate.defaultInitOptions |
no outgoing calls
no test coverage detected