Skip to content

Commit e10bcec

Browse files
committed
Update README.md
1 parent 16671a2 commit e10bcec

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ In Multiplex, equality comparison on anonymous types are defined in terms of the
137137
Note that in JavaScript two distinct objects are never equal for either strict or abstract comparisons:
138138

139139
````javascript
140-
{ val: 1} == { val: 1} // false
141-
{ val: 1} === { val: 1} // false
140+
{ val: 1 } == { val: 1 } // false
141+
{ val: 1 } === { val: 1 } // false
142142
````
143143

144144
However using `mx.equals` method you can compare two object literals which results in true if all their properties are equal:
@@ -147,10 +147,12 @@ However using `mx.equals` method you can compare two object literals which resul
147147
mx.equals({ val: 1 }, { val: 1 }); // true
148148
````
149149

150-
Since Multiplex LINQ operations internally make use of the `mx.equals` method, you can write expressions like this using object literals:
150+
Since Multiplex LINQ operations internally make use of the `mx.equals` method, you can write expressions like these using object literals:
151151

152152
```javascript
153-
mx([1, 2, 3, 4, 5]).select("t => { val: t }").contains({ val: 1 }); // true
153+
mx([{ val: 1 }, { val: 1 }]).contains({ val: 1 }); // true
154+
mx([{ val: 1 }, { val: 1 }]).distinct().count(); // 1
155+
mx([{ val: 1 }, { val: 1 }]).except([{ val: 1 }]).count(); // 0
154156
```
155157

156158
The following example uses object literals as the *key* for the `groupBy` operator:

0 commit comments

Comments
 (0)