rtfeldman / seamless-immutable

Immutable data structures for JavaScript which are backwards-compatible with normal JS Arrays and Objects.
BSD 3-Clause "New" or "Revised" License
5.37k stars 195 forks source link

The object.freeze was being called only in node #101

Closed danfma closed 8 years ago

rtfeldman commented 8 years ago

It's only being called when the "production" environment variable is being set; it's designed to work with https://www.npmjs.com/browse/keyword/envify

Skipping freezing for the production build is the whole point! :smile:

meta-meta commented 7 years ago

@rtfeldman why not freeze in production? Is performance that much worse? Seems like this would lead to subtle bugs in edge cases when in production, we visit some old haunted code path without test coverage... Much like Luke's training scene in Empire. He decapitates Vader, which he assumes has been wrapped in immutable machinery only to discover his own face in place of Anakin's.