From 180ca47201cbbd96318290275fcfd1b314c258f9 Mon Sep 17 00:00:00 2001 From: Anson Kao Date: Tue, 26 Jan 2016 21:43:37 -0500 Subject: [PATCH] Documented u.freeze: code style + clarification --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 69430bb..38acec2 100644 --- a/README.md +++ b/README.md @@ -208,10 +208,10 @@ expect(result).to.eql({ person: { name: 'Olivier P.', age: 21 } }); ### `u.freeze` -Freeze your initial state to protect against mutations. Does nothing in production. +Freeze your initial state to protect against mutations. Only performs the freezing in development, and returns the original object unchanged in production. ```js -var state = u.freeze({someKey: "Some Value"}) +var state = u.freeze({ someKey: "Some Value" }) state.someKey = "Mutate" // ERROR in development ```