immutable 5.0.0 → 5.0.2

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.
Files changed (80) hide show
  1. package/dist/immutable.es.js +5930 -0
  2. package/dist/immutable.js +1 -1
  3. package/dist/immutable.min.js +1 -1
  4. package/package.json +2 -2
  5. package/dist/es/Collection.js +0 -79
  6. package/dist/es/CollectionImpl.js +0 -776
  7. package/dist/es/Hash.js +0 -260
  8. package/dist/es/Immutable.js +0 -73
  9. package/dist/es/Iterator.js +0 -106
  10. package/dist/es/List.js +0 -696
  11. package/dist/es/Map.js +0 -820
  12. package/dist/es/Math.js +0 -45
  13. package/dist/es/Operations.js +0 -953
  14. package/dist/es/OrderedMap.js +0 -196
  15. package/dist/es/OrderedSet.js +0 -92
  16. package/dist/es/PairSorting.js +0 -30
  17. package/dist/es/Range.js +0 -178
  18. package/dist/es/Record.js +0 -292
  19. package/dist/es/Repeat.js +0 -133
  20. package/dist/es/Seq.js +0 -401
  21. package/dist/es/Set.js +0 -279
  22. package/dist/es/Stack.js +0 -261
  23. package/dist/es/TrieUtils.js +0 -117
  24. package/dist/es/fromJS.js +0 -74
  25. package/dist/es/functional/get.js +0 -38
  26. package/dist/es/functional/getIn.js +0 -41
  27. package/dist/es/functional/has.js +0 -35
  28. package/dist/es/functional/hasIn.js +0 -32
  29. package/dist/es/functional/merge.js +0 -137
  30. package/dist/es/functional/remove.js +0 -56
  31. package/dist/es/functional/removeIn.js +0 -32
  32. package/dist/es/functional/set.js +0 -52
  33. package/dist/es/functional/setIn.js +0 -32
  34. package/dist/es/functional/update.js +0 -31
  35. package/dist/es/functional/updateIn.js +0 -94
  36. package/dist/es/is.js +0 -108
  37. package/dist/es/methods/asImmutable.js +0 -29
  38. package/dist/es/methods/asMutable.js +0 -31
  39. package/dist/es/methods/deleteIn.js +0 -31
  40. package/dist/es/methods/getIn.js +0 -31
  41. package/dist/es/methods/hasIn.js +0 -31
  42. package/dist/es/methods/merge.js +0 -79
  43. package/dist/es/methods/mergeDeep.js +0 -41
  44. package/dist/es/methods/mergeDeepIn.js +0 -37
  45. package/dist/es/methods/mergeIn.js +0 -36
  46. package/dist/es/methods/setIn.js +0 -31
  47. package/dist/es/methods/toObject.js +0 -36
  48. package/dist/es/methods/update.js +0 -33
  49. package/dist/es/methods/updateIn.js +0 -31
  50. package/dist/es/methods/wasAltered.js +0 -29
  51. package/dist/es/methods/withMutations.js +0 -31
  52. package/dist/es/package.json.js +0 -27
  53. package/dist/es/predicates/isAssociative.js +0 -32
  54. package/dist/es/predicates/isCollection.js +0 -32
  55. package/dist/es/predicates/isImmutable.js +0 -32
  56. package/dist/es/predicates/isIndexed.js +0 -31
  57. package/dist/es/predicates/isKeyed.js +0 -31
  58. package/dist/es/predicates/isList.js +0 -31
  59. package/dist/es/predicates/isMap.js +0 -31
  60. package/dist/es/predicates/isOrdered.js +0 -31
  61. package/dist/es/predicates/isOrderedMap.js +0 -32
  62. package/dist/es/predicates/isOrderedSet.js +0 -32
  63. package/dist/es/predicates/isRecord.js +0 -31
  64. package/dist/es/predicates/isSeq.js +0 -31
  65. package/dist/es/predicates/isSet.js +0 -31
  66. package/dist/es/predicates/isStack.js +0 -31
  67. package/dist/es/predicates/isValueObject.js +0 -33
  68. package/dist/es/toJS.js +0 -54
  69. package/dist/es/utils/arrCopy.js +0 -36
  70. package/dist/es/utils/assertNotInfinite.js +0 -34
  71. package/dist/es/utils/coerceKeyPath.js +0 -40
  72. package/dist/es/utils/deepEqual.js +0 -99
  73. package/dist/es/utils/hasOwnProperty.js +0 -27
  74. package/dist/es/utils/invariant.js +0 -29
  75. package/dist/es/utils/isArrayLike.js +0 -44
  76. package/dist/es/utils/isDataStructure.js +0 -39
  77. package/dist/es/utils/isPlainObj.js +0 -52
  78. package/dist/es/utils/mixin.js +0 -38
  79. package/dist/es/utils/quoteString.js +0 -36
  80. package/dist/es/utils/shallowCopy.js +0 -41
@@ -1,31 +0,0 @@
1
- /**
2
- * @license
3
- * MIT License
4
- *
5
- * Copyright (c) 2014-present, Lee Byron and other contributors.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- import { hasIn as hasIn$1 } from '../functional/hasIn.js';
26
-
27
- function hasIn(searchKeyPath) {
28
- return hasIn$1(this, searchKeyPath);
29
- }
30
-
31
- export { hasIn };
@@ -1,79 +0,0 @@
1
- /**
2
- * @license
3
- * MIT License
4
- *
5
- * Copyright (c) 2014-present, Lee Byron and other contributors.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- import { KeyedCollection } from '../Collection.js';
26
- import { NOT_SET } from '../TrieUtils.js';
27
- import { update } from '../functional/update.js';
28
-
29
- function merge() {
30
- var iters = [], len = arguments.length;
31
- while ( len-- ) iters[ len ] = arguments[ len ];
32
-
33
- return mergeIntoKeyedWith(this, iters);
34
- }
35
-
36
- function mergeWith(merger) {
37
- var iters = [], len = arguments.length - 1;
38
- while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];
39
-
40
- if (typeof merger !== 'function') {
41
- throw new TypeError('Invalid merger function: ' + merger);
42
- }
43
- return mergeIntoKeyedWith(this, iters, merger);
44
- }
45
-
46
- function mergeIntoKeyedWith(collection, collections, merger) {
47
- var iters = [];
48
- for (var ii = 0; ii < collections.length; ii++) {
49
- var collection$1 = KeyedCollection(collections[ii]);
50
- if (collection$1.size !== 0) {
51
- iters.push(collection$1);
52
- }
53
- }
54
- if (iters.length === 0) {
55
- return collection;
56
- }
57
- if (
58
- collection.toSeq().size === 0 &&
59
- !collection.__ownerID &&
60
- iters.length === 1
61
- ) {
62
- return collection.constructor(iters[0]);
63
- }
64
- return collection.withMutations(function (collection) {
65
- var mergeIntoCollection = merger
66
- ? function (value, key) {
67
- update(collection, key, NOT_SET, function (oldVal) { return oldVal === NOT_SET ? value : merger(oldVal, value, key); }
68
- );
69
- }
70
- : function (value, key) {
71
- collection.set(key, value);
72
- };
73
- for (var ii = 0; ii < iters.length; ii++) {
74
- iters[ii].forEach(mergeIntoCollection);
75
- }
76
- });
77
- }
78
-
79
- export { merge, mergeWith };
@@ -1,41 +0,0 @@
1
- /**
2
- * @license
3
- * MIT License
4
- *
5
- * Copyright (c) 2014-present, Lee Byron and other contributors.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- import { mergeDeepWithSources } from '../functional/merge.js';
26
-
27
- function mergeDeep() {
28
- var iters = [], len = arguments.length;
29
- while ( len-- ) iters[ len ] = arguments[ len ];
30
-
31
- return mergeDeepWithSources(this, iters);
32
- }
33
-
34
- function mergeDeepWith(merger) {
35
- var iters = [], len = arguments.length - 1;
36
- while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];
37
-
38
- return mergeDeepWithSources(this, iters, merger);
39
- }
40
-
41
- export { mergeDeep, mergeDeepWith };
@@ -1,37 +0,0 @@
1
- /**
2
- * @license
3
- * MIT License
4
- *
5
- * Copyright (c) 2014-present, Lee Byron and other contributors.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- import { mergeDeepWithSources } from '../functional/merge.js';
26
- import { updateIn } from '../functional/updateIn.js';
27
- import { emptyMap } from '../Map.js';
28
-
29
- function mergeDeepIn(keyPath) {
30
- var iters = [], len = arguments.length - 1;
31
- while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];
32
-
33
- return updateIn(this, keyPath, emptyMap(), function (m) { return mergeDeepWithSources(m, iters); }
34
- );
35
- }
36
-
37
- export { mergeDeepIn };
@@ -1,36 +0,0 @@
1
- /**
2
- * @license
3
- * MIT License
4
- *
5
- * Copyright (c) 2014-present, Lee Byron and other contributors.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- import { mergeWithSources } from '../functional/merge.js';
26
- import { updateIn } from '../functional/updateIn.js';
27
- import { emptyMap } from '../Map.js';
28
-
29
- function mergeIn(keyPath) {
30
- var iters = [], len = arguments.length - 1;
31
- while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];
32
-
33
- return updateIn(this, keyPath, emptyMap(), function (m) { return mergeWithSources(m, iters); });
34
- }
35
-
36
- export { mergeIn };
@@ -1,31 +0,0 @@
1
- /**
2
- * @license
3
- * MIT License
4
- *
5
- * Copyright (c) 2014-present, Lee Byron and other contributors.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- import { setIn as setIn$1 } from '../functional/setIn.js';
26
-
27
- function setIn(keyPath, v) {
28
- return setIn$1(this, keyPath, v);
29
- }
30
-
31
- export { setIn };
@@ -1,36 +0,0 @@
1
- /**
2
- * @license
3
- * MIT License
4
- *
5
- * Copyright (c) 2014-present, Lee Byron and other contributors.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- import assertNotInfinite from '../utils/assertNotInfinite.js';
26
-
27
- function toObject() {
28
- assertNotInfinite(this.size);
29
- var object = {};
30
- this.__iterate(function (v, k) {
31
- object[k] = v;
32
- });
33
- return object;
34
- }
35
-
36
- export { toObject };
@@ -1,33 +0,0 @@
1
- /**
2
- * @license
3
- * MIT License
4
- *
5
- * Copyright (c) 2014-present, Lee Byron and other contributors.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- import { update as update$1 } from '../functional/update.js';
26
-
27
- function update(key, notSetValue, updater) {
28
- return arguments.length === 1
29
- ? key(this)
30
- : update$1(this, key, notSetValue, updater);
31
- }
32
-
33
- export { update };
@@ -1,31 +0,0 @@
1
- /**
2
- * @license
3
- * MIT License
4
- *
5
- * Copyright (c) 2014-present, Lee Byron and other contributors.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- import { updateIn as updateIn$1 } from '../functional/updateIn.js';
26
-
27
- function updateIn(keyPath, notSetValue, updater) {
28
- return updateIn$1(this, keyPath, notSetValue, updater);
29
- }
30
-
31
- export { updateIn };
@@ -1,29 +0,0 @@
1
- /**
2
- * @license
3
- * MIT License
4
- *
5
- * Copyright (c) 2014-present, Lee Byron and other contributors.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- function wasAltered() {
26
- return this.__altered;
27
- }
28
-
29
- export { wasAltered };
@@ -1,31 +0,0 @@
1
- /**
2
- * @license
3
- * MIT License
4
- *
5
- * Copyright (c) 2014-present, Lee Byron and other contributors.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- function withMutations(fn) {
26
- var mutable = this.asMutable();
27
- fn(mutable);
28
- return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;
29
- }
30
-
31
- export { withMutations };
@@ -1,27 +0,0 @@
1
- /**
2
- * @license
3
- * MIT License
4
- *
5
- * Copyright (c) 2014-present, Lee Byron and other contributors.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- var version = "5.0.0";
26
-
27
- export { version };
@@ -1,32 +0,0 @@
1
- /**
2
- * @license
3
- * MIT License
4
- *
5
- * Copyright (c) 2014-present, Lee Byron and other contributors.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- import { isKeyed } from './isKeyed.js';
26
- import { isIndexed } from './isIndexed.js';
27
-
28
- function isAssociative(maybeAssociative) {
29
- return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);
30
- }
31
-
32
- export { isAssociative };
@@ -1,32 +0,0 @@
1
- /**
2
- * @license
3
- * MIT License
4
- *
5
- * Copyright (c) 2014-present, Lee Byron and other contributors.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- // Note: value is unchanged to not break immutable-devtools.
26
- var IS_COLLECTION_SYMBOL = '@@__IMMUTABLE_ITERABLE__@@';
27
-
28
- function isCollection(maybeCollection) {
29
- return Boolean(maybeCollection && maybeCollection[IS_COLLECTION_SYMBOL]);
30
- }
31
-
32
- export { IS_COLLECTION_SYMBOL, isCollection };
@@ -1,32 +0,0 @@
1
- /**
2
- * @license
3
- * MIT License
4
- *
5
- * Copyright (c) 2014-present, Lee Byron and other contributors.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- import { isCollection } from './isCollection.js';
26
- import { isRecord } from './isRecord.js';
27
-
28
- function isImmutable(maybeImmutable) {
29
- return isCollection(maybeImmutable) || isRecord(maybeImmutable);
30
- }
31
-
32
- export { isImmutable };
@@ -1,31 +0,0 @@
1
- /**
2
- * @license
3
- * MIT License
4
- *
5
- * Copyright (c) 2014-present, Lee Byron and other contributors.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- var IS_INDEXED_SYMBOL = '@@__IMMUTABLE_INDEXED__@@';
26
-
27
- function isIndexed(maybeIndexed) {
28
- return Boolean(maybeIndexed && maybeIndexed[IS_INDEXED_SYMBOL]);
29
- }
30
-
31
- export { IS_INDEXED_SYMBOL, isIndexed };
@@ -1,31 +0,0 @@
1
- /**
2
- * @license
3
- * MIT License
4
- *
5
- * Copyright (c) 2014-present, Lee Byron and other contributors.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- var IS_KEYED_SYMBOL = '@@__IMMUTABLE_KEYED__@@';
26
-
27
- function isKeyed(maybeKeyed) {
28
- return Boolean(maybeKeyed && maybeKeyed[IS_KEYED_SYMBOL]);
29
- }
30
-
31
- export { IS_KEYED_SYMBOL, isKeyed };
@@ -1,31 +0,0 @@
1
- /**
2
- * @license
3
- * MIT License
4
- *
5
- * Copyright (c) 2014-present, Lee Byron and other contributors.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- var IS_LIST_SYMBOL = '@@__IMMUTABLE_LIST__@@';
26
-
27
- function isList(maybeList) {
28
- return Boolean(maybeList && maybeList[IS_LIST_SYMBOL]);
29
- }
30
-
31
- export { IS_LIST_SYMBOL, isList };