immutable 5.0.0-beta.4 → 5.0.0-beta.5
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/README.md +1 -1
- package/dist/es/Collection.js +2 -1
- package/dist/es/CollectionImpl.js +6 -6
- package/dist/es/Hash.js +1 -0
- package/dist/es/Immutable.js +2 -2
- package/dist/es/Iterator.js +1 -0
- package/dist/es/List.js +2 -1
- package/dist/es/Map.js +2 -1
- package/dist/es/Math.js +1 -0
- package/dist/es/Operations.js +2 -1
- package/dist/es/OrderedMap.js +2 -1
- package/dist/es/OrderedSet.js +2 -1
- package/dist/es/PairSorting.js +1 -0
- package/dist/es/Range.js +13 -5
- package/dist/es/Record.js +2 -1
- package/dist/es/Repeat.js +1 -0
- package/dist/es/Seq.js +2 -1
- package/dist/es/Set.js +1 -0
- package/dist/es/Stack.js +1 -0
- package/dist/es/TrieUtils.js +2 -0
- package/dist/es/fromJS.js +1 -0
- package/dist/es/functional/get.js +1 -0
- package/dist/es/functional/getIn.js +1 -0
- package/dist/es/functional/has.js +1 -0
- package/dist/es/functional/hasIn.js +1 -0
- package/dist/es/functional/merge.js +1 -0
- package/dist/es/functional/remove.js +1 -0
- package/dist/es/functional/removeIn.js +1 -0
- package/dist/es/functional/set.js +1 -0
- package/dist/es/functional/setIn.js +1 -0
- package/dist/es/functional/update.js +1 -0
- package/dist/es/functional/updateIn.js +1 -0
- package/dist/es/is.js +1 -0
- package/dist/es/methods/asImmutable.js +1 -0
- package/dist/es/methods/asMutable.js +1 -0
- package/dist/es/methods/deleteIn.js +1 -0
- package/dist/es/methods/getIn.js +1 -0
- package/dist/es/methods/hasIn.js +1 -0
- package/dist/es/methods/merge.js +1 -0
- package/dist/es/methods/mergeDeep.js +1 -0
- package/dist/es/methods/mergeDeepIn.js +1 -0
- package/dist/es/methods/mergeIn.js +1 -0
- package/dist/es/methods/setIn.js +1 -0
- package/dist/es/methods/toObject.js +1 -0
- package/dist/es/methods/update.js +1 -0
- package/dist/es/methods/updateIn.js +1 -0
- package/dist/es/methods/wasAltered.js +1 -0
- package/dist/es/methods/withMutations.js +1 -0
- package/dist/es/package.json.js +2 -1
- package/dist/es/predicates/isAssociative.js +1 -0
- package/dist/es/predicates/isCollection.js +2 -0
- package/dist/es/predicates/isImmutable.js +1 -0
- package/dist/es/predicates/isIndexed.js +1 -0
- package/dist/es/predicates/isKeyed.js +1 -0
- package/dist/es/predicates/isList.js +1 -0
- package/dist/es/predicates/isMap.js +1 -0
- package/dist/es/predicates/isOrdered.js +1 -0
- package/dist/es/predicates/isOrderedMap.js +1 -0
- package/dist/es/predicates/isOrderedSet.js +1 -0
- package/dist/es/predicates/isRecord.js +1 -0
- package/dist/es/predicates/isSeq.js +1 -0
- package/dist/es/predicates/isSet.js +1 -0
- package/dist/es/predicates/isStack.js +1 -0
- package/dist/es/predicates/isValueObject.js +1 -0
- package/dist/es/toJS.js +1 -0
- package/dist/es/utils/arrCopy.js +3 -1
- package/dist/es/utils/assertNotInfinite.js +2 -1
- package/dist/es/utils/coerceKeyPath.js +2 -1
- package/dist/es/utils/deepEqual.js +2 -1
- package/dist/es/utils/hasOwnProperty.js +2 -1
- package/dist/es/utils/invariant.js +2 -1
- package/dist/es/utils/isArrayLike.js +2 -1
- package/dist/es/utils/isDataStructure.js +2 -1
- package/dist/es/utils/isPlainObj.js +2 -1
- package/dist/es/utils/mixin.js +5 -1
- package/dist/es/utils/quoteString.js +5 -1
- package/dist/es/utils/shallowCopy.js +2 -1
- package/dist/immutable.d.ts +6 -2
- package/dist/immutable.js +25 -10
- package/dist/immutable.min.js +2 -32
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/immutable-js/immutable-js/actions/workflows/ci.yml?query=branch%3Amain) [Chat on slack](https://immutable-js.slack.com)
|
|
4
4
|
|
|
5
|
-
[Read the docs](https://immutable-js.com) and eat your vegetables.
|
|
5
|
+
[Read the docs](https://immutable-js.com/docs/) and eat your vegetables.
|
|
6
6
|
|
|
7
7
|
Docs are automatically generated from [README.md][] and [immutable.d.ts][].
|
|
8
8
|
Please contribute! Also, don't miss the [wiki][] which contains articles on
|
package/dist/es/Collection.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @license
|
|
2
3
|
* MIT License
|
|
3
4
|
*
|
|
4
5
|
* Copyright (c) 2014-present, Lee Byron and other contributors.
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
23
|
* SOFTWARE.
|
|
23
24
|
*/
|
|
24
|
-
import { Seq,
|
|
25
|
+
import { Seq, KeyedSeq, IndexedSeq, SetSeq } from './Seq.js';
|
|
25
26
|
import { isCollection } from './predicates/isCollection.js';
|
|
26
27
|
import { isKeyed } from './predicates/isKeyed.js';
|
|
27
28
|
import { isIndexed } from './predicates/isIndexed.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @license
|
|
2
3
|
* MIT License
|
|
3
4
|
*
|
|
4
5
|
* Copyright (c) 2014-present, Lee Byron and other contributors.
|
|
@@ -22,17 +23,16 @@
|
|
|
22
23
|
* SOFTWARE.
|
|
23
24
|
*/
|
|
24
25
|
import { Collection, KeyedCollection, IndexedCollection, SetCollection } from './Collection.js';
|
|
25
|
-
|
|
26
|
-
import { isCollection, IS_COLLECTION_SYMBOL } from './predicates/isCollection.js';
|
|
26
|
+
import { IS_COLLECTION_SYMBOL, isCollection } from './predicates/isCollection.js';
|
|
27
27
|
import { isAssociative } from './predicates/isAssociative.js';
|
|
28
28
|
import { isKeyed, IS_KEYED_SYMBOL } from './predicates/isKeyed.js';
|
|
29
29
|
import { isIndexed, IS_INDEXED_SYMBOL } from './predicates/isIndexed.js';
|
|
30
|
-
import {
|
|
30
|
+
import { IS_ORDERED_SYMBOL, isOrdered } from './predicates/isOrdered.js';
|
|
31
31
|
import { is } from './is.js';
|
|
32
32
|
import { ensureSize, returnTrue, NOT_SET, resolveBegin, wrapIndex } from './TrieUtils.js';
|
|
33
33
|
import { hash } from './Hash.js';
|
|
34
34
|
import { imul, smi } from './Math.js';
|
|
35
|
-
import {
|
|
35
|
+
import { ITERATE_ENTRIES, ITERATE_KEYS, ITERATE_VALUES, ITERATOR_SYMBOL, Iterator } from './Iterator.js';
|
|
36
36
|
import arrCopy from './utils/arrCopy.js';
|
|
37
37
|
import assertNotInfinite from './utils/assertNotInfinite.js';
|
|
38
38
|
import deepEqual from './utils/deepEqual.js';
|
|
@@ -46,7 +46,7 @@ import { Set } from './Set.js';
|
|
|
46
46
|
import { OrderedSet } from './OrderedSet.js';
|
|
47
47
|
import { Stack } from './Stack.js';
|
|
48
48
|
import { Range } from './Range.js';
|
|
49
|
-
import { ArraySeq,
|
|
49
|
+
import { ArraySeq, IndexedSeq, KeyedSeq, SetSeq } from './Seq.js';
|
|
50
50
|
import { ToIndexedSequence, ToKeyedSequence, ToSetSequence, reify, concatFactory, filterFactory, partitionFactory, mapFactory, reverseFactory, sliceFactory, sortFactory, countByFactory, flatMapFactory, flattenFactory, FromEntriesSequence, groupByFactory, maxFactory, skipWhileFactory, takeWhileFactory, flipFactory, interposeFactory, zipWithFactory } from './Operations.js';
|
|
51
51
|
import { getIn } from './methods/getIn.js';
|
|
52
52
|
import { hasIn } from './methods/hasIn.js';
|
|
@@ -778,4 +778,4 @@ function hashMerge(a, b) {
|
|
|
778
778
|
return (a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2))) | 0; // int
|
|
779
779
|
}
|
|
780
780
|
|
|
781
|
-
export { CollectionPrototype, IndexedCollectionPrototype };
|
|
781
|
+
export { Collection, CollectionPrototype, IndexedCollectionPrototype };
|
package/dist/es/Hash.js
CHANGED
package/dist/es/Immutable.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @license
|
|
2
3
|
* MIT License
|
|
3
4
|
*
|
|
4
5
|
* Copyright (c) 2014-present, Lee Byron and other contributors.
|
|
@@ -65,9 +66,8 @@ export { update } from './functional/update.js';
|
|
|
65
66
|
export { updateIn } from './functional/updateIn.js';
|
|
66
67
|
export { version } from './package.json.js';
|
|
67
68
|
import { Collection } from './Collection.js';
|
|
68
|
-
export { Collection } from './Collection.js';
|
|
69
69
|
|
|
70
70
|
// Note: Iterable is deprecated
|
|
71
71
|
var Iterable = Collection;
|
|
72
72
|
|
|
73
|
-
export { Iterable };
|
|
73
|
+
export { Collection, Iterable };
|
package/dist/es/Iterator.js
CHANGED
package/dist/es/List.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @license
|
|
2
3
|
* MIT License
|
|
3
4
|
*
|
|
4
5
|
* Copyright (c) 2014-present, Lee Byron and other contributors.
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
23
|
* SOFTWARE.
|
|
23
24
|
*/
|
|
24
|
-
import { wrapIndex, MASK, SHIFT, wholeSlice, DELETE,
|
|
25
|
+
import { wrapIndex, MASK, SHIFT, wholeSlice, DELETE, SetRef, OwnerID, SIZE, MakeRef, resolveEnd, resolveBegin } from './TrieUtils.js';
|
|
25
26
|
import { isList, IS_LIST_SYMBOL } from './predicates/isList.js';
|
|
26
27
|
import { IndexedCollection } from './Collection.js';
|
|
27
28
|
import { hasIterator, Iterator, iteratorDone, iteratorValue } from './Iterator.js';
|
package/dist/es/Map.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @license
|
|
2
3
|
* MIT License
|
|
3
4
|
*
|
|
4
5
|
* Copyright (c) 2014-present, Lee Byron and other contributors.
|
|
@@ -27,7 +28,7 @@ import { isMap, IS_MAP_SYMBOL } from './predicates/isMap.js';
|
|
|
27
28
|
import { isOrdered } from './predicates/isOrdered.js';
|
|
28
29
|
import { DELETE, NOT_SET, SetRef, MakeRef, MASK, SHIFT, SIZE, OwnerID } from './TrieUtils.js';
|
|
29
30
|
import { hash } from './Hash.js';
|
|
30
|
-
import {
|
|
31
|
+
import { iteratorDone, Iterator, iteratorValue } from './Iterator.js';
|
|
31
32
|
import { sortFactory } from './Operations.js';
|
|
32
33
|
import arrCopy from './utils/arrCopy.js';
|
|
33
34
|
import assertNotInfinite from './utils/assertNotInfinite.js';
|
package/dist/es/Math.js
CHANGED
package/dist/es/Operations.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @license
|
|
2
3
|
* MIT License
|
|
3
4
|
*
|
|
4
5
|
* Copyright (c) 2014-present, Lee Byron and other contributors.
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
* SOFTWARE.
|
|
23
24
|
*/
|
|
24
25
|
import { ensureSize, NOT_SET, wholeSlice, wrapIndex, resolveBegin, resolveEnd } from './TrieUtils.js';
|
|
25
|
-
import { KeyedCollection, IndexedCollection, SetCollection
|
|
26
|
+
import { KeyedCollection, Collection, IndexedCollection, SetCollection } from './Collection.js';
|
|
26
27
|
import { isCollection } from './predicates/isCollection.js';
|
|
27
28
|
import { isKeyed } from './predicates/isKeyed.js';
|
|
28
29
|
import { isIndexed } from './predicates/isIndexed.js';
|
package/dist/es/OrderedMap.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @license
|
|
2
3
|
* MIT License
|
|
3
4
|
*
|
|
4
5
|
* Copyright (c) 2014-present, Lee Byron and other contributors.
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
import { KeyedCollection } from './Collection.js';
|
|
25
26
|
import { IS_ORDERED_SYMBOL } from './predicates/isOrdered.js';
|
|
26
27
|
import { isOrderedMap } from './predicates/isOrderedMap.js';
|
|
27
|
-
import {
|
|
28
|
+
import { Map, emptyMap } from './Map.js';
|
|
28
29
|
import { emptyList } from './List.js';
|
|
29
30
|
import { DELETE, NOT_SET, SIZE } from './TrieUtils.js';
|
|
30
31
|
import assertNotInfinite from './utils/assertNotInfinite.js';
|
package/dist/es/OrderedSet.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @license
|
|
2
3
|
* MIT License
|
|
3
4
|
*
|
|
4
5
|
* Copyright (c) 2014-present, Lee Byron and other contributors.
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
23
|
* SOFTWARE.
|
|
23
24
|
*/
|
|
24
|
-
import {
|
|
25
|
+
import { KeyedCollection, SetCollection } from './Collection.js';
|
|
25
26
|
import { IS_ORDERED_SYMBOL } from './predicates/isOrdered.js';
|
|
26
27
|
import { isOrderedSet } from './predicates/isOrderedSet.js';
|
|
27
28
|
import { IndexedCollectionPrototype } from './CollectionImpl.js';
|
package/dist/es/PairSorting.js
CHANGED
package/dist/es/Range.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @license
|
|
2
3
|
* MIT License
|
|
3
4
|
*
|
|
4
5
|
* Copyright (c) 2014-present, Lee Byron and other contributors.
|
|
@@ -34,15 +35,22 @@ import deepEqual from './utils/deepEqual.js';
|
|
|
34
35
|
*/
|
|
35
36
|
var Range = /*@__PURE__*/(function (IndexedSeq) {
|
|
36
37
|
function Range(start, end, step) {
|
|
38
|
+
if ( step === void 0 ) step = 1;
|
|
39
|
+
|
|
37
40
|
if (!(this instanceof Range)) {
|
|
38
41
|
return new Range(start, end, step);
|
|
39
42
|
}
|
|
40
43
|
invariant(step !== 0, 'Cannot step a Range by 0');
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
invariant(
|
|
45
|
+
start !== undefined,
|
|
46
|
+
'You must define a start value when using Range'
|
|
47
|
+
);
|
|
48
|
+
invariant(
|
|
49
|
+
end !== undefined,
|
|
50
|
+
'You must define an end value when using Range'
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
step = Math.abs(step);
|
|
46
54
|
if (end < start) {
|
|
47
55
|
step = -step;
|
|
48
56
|
}
|
package/dist/es/Record.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @license
|
|
2
3
|
* MIT License
|
|
3
4
|
*
|
|
4
5
|
* Copyright (c) 2014-present, Lee Byron and other contributors.
|
|
@@ -25,7 +26,7 @@ import { toJS } from './toJS.js';
|
|
|
25
26
|
import { KeyedCollection } from './Collection.js';
|
|
26
27
|
import { keyedSeqFromValue } from './Seq.js';
|
|
27
28
|
import { List } from './List.js';
|
|
28
|
-
import {
|
|
29
|
+
import { ITERATOR_SYMBOL, ITERATE_ENTRIES } from './Iterator.js';
|
|
29
30
|
import { isRecord, IS_RECORD_SYMBOL } from './predicates/isRecord.js';
|
|
30
31
|
import { CollectionPrototype } from './CollectionImpl.js';
|
|
31
32
|
import { DELETE } from './TrieUtils.js';
|
package/dist/es/Repeat.js
CHANGED
package/dist/es/Seq.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @license
|
|
2
3
|
* MIT License
|
|
3
4
|
*
|
|
4
5
|
* Copyright (c) 2014-present, Lee Byron and other contributors.
|
|
@@ -30,7 +31,7 @@ import { isKeyed } from './predicates/isKeyed.js';
|
|
|
30
31
|
import { isAssociative } from './predicates/isAssociative.js';
|
|
31
32
|
import { isRecord } from './predicates/isRecord.js';
|
|
32
33
|
import { IS_ORDERED_SYMBOL } from './predicates/isOrdered.js';
|
|
33
|
-
import { Iterator, iteratorDone, iteratorValue,
|
|
34
|
+
import { Iterator, iteratorDone, iteratorValue, isEntriesIterable, isKeysIterable, hasIterator, getIterator, isIterator } from './Iterator.js';
|
|
34
35
|
import hasOwnProperty from './utils/hasOwnProperty.js';
|
|
35
36
|
import isArrayLike from './utils/isArrayLike.js';
|
|
36
37
|
|
package/dist/es/Set.js
CHANGED
package/dist/es/Stack.js
CHANGED
package/dist/es/TrieUtils.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @license
|
|
2
3
|
* MIT License
|
|
3
4
|
*
|
|
4
5
|
* Copyright (c) 2014-present, Lee Byron and other contributors.
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
23
|
* SOFTWARE.
|
|
23
24
|
*/
|
|
25
|
+
// Used for setting prototype methods that IE8 chokes on.
|
|
24
26
|
var DELETE = 'delete';
|
|
25
27
|
|
|
26
28
|
// Constants describing the size of trie nodes.
|
package/dist/es/fromJS.js
CHANGED
package/dist/es/is.js
CHANGED
package/dist/es/methods/getIn.js
CHANGED
package/dist/es/methods/hasIn.js
CHANGED
package/dist/es/methods/merge.js
CHANGED
package/dist/es/methods/setIn.js
CHANGED
package/dist/es/package.json.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @license
|
|
2
3
|
* MIT License
|
|
3
4
|
*
|
|
4
5
|
* Copyright (c) 2014-present, Lee Byron and other contributors.
|
|
@@ -21,6 +22,6 @@
|
|
|
21
22
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
23
|
* SOFTWARE.
|
|
23
24
|
*/
|
|
24
|
-
var version = "5.0.0-beta.
|
|
25
|
+
var version = "5.0.0-beta.5";
|
|
25
26
|
|
|
26
27
|
export { version };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @license
|
|
2
3
|
* MIT License
|
|
3
4
|
*
|
|
4
5
|
* Copyright (c) 2014-present, Lee Byron and other contributors.
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
23
|
* SOFTWARE.
|
|
23
24
|
*/
|
|
25
|
+
// Note: value is unchanged to not break immutable-devtools.
|
|
24
26
|
var IS_COLLECTION_SYMBOL = '@@__IMMUTABLE_ITERABLE__@@';
|
|
25
27
|
|
|
26
28
|
function isCollection(maybeCollection) {
|