1.0.2 • Published 7 years ago

functional-freeze v1.0.2

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

functional-freeze

Freeze an object without changing the original argument.

Usage

const freeze = require('functional-freeze')

const initial = { some: true }
const frozen = freeze(initial)

frozen.some = false
frozen.nonExisting = 123

console.log(frozen.some === true)
console.log(frozen.nonExisting === undefined)

Methods

const freeze = require('functional-freeze')

freeze(someObject)

Calls Object.freeze recursively without changing the original object.

License

MIT

Contributors

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago