Closed danny-andrews closed 7 years ago
Fair enough. Happy to accept a PR for this! :smile:
(noob here, hopefully not too off-topic) It would be good to know (without testing) whether static object/array methods like Object.keys() will work. Nothing in the readme leads me to guess one way or the other.
@estaub yes, they will work. All objects and arrays are normal javascript objects and arrays with the exception that they are frozen and mutating methods throw errors.
I actually don't think enumerating the modified built-in methods is that important anymore. The purpose of the library implies it's going to be doing that stuff. It's more important to know which methods have been added to the prototype (which is already documented). Although, from the examples, it's not clear that Array.prototype
is modified, since the Immutable.METHOD_NAME
version is used. Example: https://github.com/rtfeldman/seamless-immutable#flatmap.
In the docs, it reads:
Modifying built-in behavior of basic data structures is a pretty big deal, so it would be nice to have an exhaustive list of the modified/added methods in 1, 2, and 4.