deep-seal
Recursively calls Object.seal on Functions and Objects. Based on the substack's deep-freeze module.
Installation
npm install deep-seal`
Or if you are a yarn user like me
yarn add deep-seal
Example usage
const deepSeal = ;const x = a: 'hello' b: 'world' delete xaconsole // hello xc = 'afkslj'console // undefined // Does not all the extension of object and // does not let you delete the properties already present
methods
const deepSeal = ;
deepSeal(o)
Calls Object.seal
recursively on all unsealed properties that are functions or objects.
Parameters
- o (function or object, Object.seal is going to be applied on)
Returns
- o (same object but deeply sealed 😄 )
LICENSE
License under MIT LICENSE. See LICENSE for more details.