Documented u.freeze

This commit is contained in:
Anson Kao 2016-01-26 17:47:17 -05:00
parent 95e641542a
commit b9571bc8fc

View File

@ -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.