2.2.1 • Published 7 years ago

deep-seal v2.2.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

deep-seal

TravisCI Build Status

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 = require('deep-seal');
const x = {a: 'hello', b: 'world'}

delete x.a
console.log(x.a) // hello

x.c = 'afkslj'
console.log(x.c) // undefined

// Does not all the extension of object and 
// does not let you delete the properties already present

methods

const deepSeal = require('deep-seal'); 

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 :smile: )

LICENSE

License under MIT LICENSE. See LICENSE for more details.

2.2.1

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago