@tutao/tutanota-utils 3.89.22 → 3.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ArrayUtils.js +5 -1
- package/package.json +2 -2
package/lib/ArrayUtils.js
CHANGED
|
@@ -400,7 +400,11 @@ export function union<T>(...iterables: Array<Iterable<T>>): Set<T> {
|
|
|
400
400
|
* @param compare: compare items in the array for equality
|
|
401
401
|
* @returns {Array<$NonMaybeType<T>>|Array<T>}
|
|
402
402
|
*/
|
|
403
|
-
export function difference<T>(
|
|
403
|
+
export function difference<T>(
|
|
404
|
+
array1: $ReadOnlyArray<T>,
|
|
405
|
+
array2: $ReadOnlyArray<T>,
|
|
406
|
+
compare: (T, T) => boolean = (a, b) => a === b
|
|
407
|
+
): Array<T> {
|
|
404
408
|
return array1.filter(element1 => !array2.some(element2 => compare(element1, element2)))
|
|
405
409
|
}
|
|
406
410
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tutao/tutanota-utils",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.91.0",
|
|
4
4
|
"license": "GPL-3.0",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@rollup/plugin-node-resolve": "11.0.1",
|
|
30
30
|
"flow-bin": "0.152.0",
|
|
31
31
|
"rollup": "2.55.1",
|
|
32
|
-
"@tutao/tutanota-test-utils": "3.
|
|
32
|
+
"@tutao/tutanota-test-utils": "3.91.0",
|
|
33
33
|
"ospec": "https://github.com/tutao/ospec.git#0472107629ede33be4c4d19e89f237a6d7b0cb11"
|
|
34
34
|
}
|
|
35
35
|
}
|