Documented u.freeze
This commit is contained in:
parent
95e641542a
commit
b9571bc8fc
@ -206,6 +206,15 @@ var result = u({ person: { [key]: 21 } }, { person: { name: 'Olivier P.', age: 2
|
||||
expect(result).to.eql({ person: { name: 'Olivier P.', age: 21 } });
|
||||
```
|
||||
|
||||
### `u.freeze`
|
||||
|
||||
Freeze your initial state to protect against mutations. Does nothing in production.
|
||||
|
||||
```js
|
||||
var state = u.freeze({someKey: "Some Value"})
|
||||
state.someKey = "Mutate" // ERROR in development
|
||||
```
|
||||
|
||||
### `u._`
|
||||
|
||||
All updeep functions are curried.
|
||||
|
Loading…
Reference in New Issue
Block a user