Documented u.freeze

main
Anson Kao 2016-01-26 17:47:17 -05:00
parent 95e641542a
commit b9571bc8fc
1 changed files with 9 additions and 0 deletions

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.