functional-freeze
Freeze an object without changing the original argument.
Last updated 3 years ago by callaars .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install functional-freeze 
SYNC missed versions from official npm registry.

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

Sponsor

Current Tags

  • 1.0.2                                ...           latest (3 years ago)

3 Versions

  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 2
Dependencies (2)
Dev Dependencies (1)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |