You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`immutable-data` provides equality which treats immutable data structures as
@@ -96,42 +191,12 @@ assert(map1 !== map2);
96
191
assert(Immutable.is(map1, map2) ===true);
97
192
```
98
193
99
-
`Immutable.is` uses the same measure of equality as [Object.is](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is) however adds:
100
-
101
-
* if both are immutable sequences and all keys and values are equal using the
102
-
same measure of equality.
103
-
104
-
105
-
JavaScript-first API
106
-
--------------------
107
-
108
-
While `immutable-data` is inspired by Clojure, Haskell and other functional
109
-
programming environments, it's designed to bring these powerful concepts to
110
-
JavaScript, and therefore has an Object-Oriented API that closely mirrors that
111
-
of [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array),
112
-
[Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map), and
The only difference is that every method that would mutate the collection
116
-
instead returns a new collection.
117
-
118
-
```javascript
119
-
var vect1 =Immutable.Vector(1,2);
120
-
var vect2 =vect1.push(3,4,5);
121
-
var vect3 =vect2.slice(1, -1).toVector();
122
-
var vect4 =vect1.concat(vect2, vect3, vect4);
123
-
assert(vect1.length===2);
124
-
assert(vect2.length===5);
125
-
assert(vect3.length===3);
126
-
assert(vect4.length===10);
127
-
```
128
-
129
-
Almost all of the methods on `Array` will be found in similar form on
130
-
`Immutable.Vector`, those of `Map` found on `Immutable.Map`, and those of `Set`
131
-
found on `Immutable.Set`, including sequence operations.
194
+
`Immutable.is` uses the same measure of equality as [Object.is](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is)
195
+
including if both are immutable sequences and all keys and values are equal
196
+
using the same measure of equality.
132
197
133
198
134
-
Batching mutations
199
+
Batching Mutations
135
200
------------------
136
201
137
202
> If a tree falls in the woods, does it make a sound?
0 commit comments