@nejs/basic-extensions 2.21.0 → 2.22.6
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/.idea/markdown.xml +8 -0
- package/.idea/modules.xml +8 -0
- package/.idea/ne-basic-extensions.iml +8 -0
- package/.idea/vcs.xml +6 -0
- package/CODE_STYLE.md +393 -0
- package/CODING_PHILOSOPHY.md +36 -0
- package/DOCUMENTATION_GUIDELINES.md +221 -0
- package/README.md +78 -4
- package/dist/@nejs/basic-extensions.bundle.2.22.6.js +25 -0
- package/dist/@nejs/basic-extensions.bundle.2.22.6.js.map +7 -0
- package/dist/cjs/classes/index.cjs +11129 -0
- package/dist/cjs/classes/index.cjs.map +7 -0
- package/dist/cjs/index.cjs +15191 -0
- package/dist/cjs/index.cjs.map +7 -0
- package/dist/cjs/utils/index.cjs +3954 -0
- package/dist/cjs/utils/index.cjs.map +7 -0
- package/dist/esm/basic-extensions.mjs +25 -0
- package/dist/esm/basic-extensions.mjs.map +7 -0
- package/package.json +16 -22
- package/repl.bootstrap.js +4 -7
- package/repl.history +30 -30
- package/src/big.int.extension.js +171 -45
- package/src/classes/enumeration.js +466 -0
- package/src/classes/index.js +5 -1
- package/src/index.js +5 -1
- package/src/math.extension.js +73 -0
- package/src/number.extension.js +18 -0
- package/src/regular.expression.extensions.js +0 -35
- package/src/utils/toolkit.js +699 -516
- package/tests/arrayextensions.test.js +3 -3
- package/tests/index.test.js +3 -1
- package/tests/newClasses/asyncIterable.test.js +3 -3
- package/tests/newClasses/deferred.test.js +3 -3
- package/tests/newClasses/descriptor.test.js +3 -3
- package/tests/newClasses/iterable.test.js +3 -3
- package/tests/newClasses/refmap.test.js +3 -3
- package/tests/newClasses/refset.test.js +3 -3
- package/tests/objectextensions.test.js +3 -3
- package/tests/setextensions.test.js +3 -3
- package/tests/stringextensions.test.js +3 -2
- package/tests/utils/descriptor.utils.test.js +1 -1
- package/tests/utils/toolkit.test.js +429 -163
- package/.esdoc.json +0 -9
- package/.vscode/settings.json +0 -5
- package/bin/build +0 -27
- package/bin/clean +0 -14
- package/bin/esbuild +0 -91
- package/bin/fixup +0 -13
- package/bin/repl.basics.js +0 -584
- package/bin/repl.signature.js +0 -63
- package/bin/version +0 -100
- package/dist/@nejs/basic-extensions.bundle.2.21.0.js +0 -25
- package/dist/@nejs/basic-extensions.bundle.2.21.0.js.map +0 -7
- package/dist/cjs/array.extensions.d.ts +0 -39
- package/dist/cjs/array.extensions.js +0 -477
- package/dist/cjs/array.extensions.js.map +0 -1
- package/dist/cjs/big.int.extension.d.ts +0 -31
- package/dist/cjs/big.int.extension.js +0 -165
- package/dist/cjs/big.int.extension.js.map +0 -1
- package/dist/cjs/classes/asyncIterable.d.ts +0 -126
- package/dist/cjs/classes/asyncIterable.js +0 -209
- package/dist/cjs/classes/asyncIterable.js.map +0 -1
- package/dist/cjs/classes/deferred.d.ts +0 -146
- package/dist/cjs/classes/deferred.js +0 -291
- package/dist/cjs/classes/deferred.js.map +0 -1
- package/dist/cjs/classes/descriptor.d.ts +0 -334
- package/dist/cjs/classes/descriptor.js +0 -537
- package/dist/cjs/classes/descriptor.js.map +0 -1
- package/dist/cjs/classes/enum.d.ts +0 -50
- package/dist/cjs/classes/enum.js +0 -405
- package/dist/cjs/classes/enum.js.map +0 -1
- package/dist/cjs/classes/index.d.ts +0 -15
- package/dist/cjs/classes/index.js +0 -63
- package/dist/cjs/classes/index.js.map +0 -1
- package/dist/cjs/classes/introspector.d.ts +0 -20
- package/dist/cjs/classes/introspector.js +0 -130
- package/dist/cjs/classes/introspector.js.map +0 -1
- package/dist/cjs/classes/iterable.d.ts +0 -169
- package/dist/cjs/classes/iterable.js +0 -268
- package/dist/cjs/classes/iterable.js.map +0 -1
- package/dist/cjs/classes/param.parser.d.ts +0 -221
- package/dist/cjs/classes/param.parser.js +0 -242
- package/dist/cjs/classes/param.parser.js.map +0 -1
- package/dist/cjs/classes/pluggable.proxy.d.ts +0 -153
- package/dist/cjs/classes/pluggable.proxy.js +0 -444
- package/dist/cjs/classes/pluggable.proxy.js.map +0 -1
- package/dist/cjs/classes/property.d.ts +0 -79
- package/dist/cjs/classes/property.js +0 -284
- package/dist/cjs/classes/property.js.map +0 -1
- package/dist/cjs/classes/refmap.d.ts +0 -238
- package/dist/cjs/classes/refmap.js +0 -421
- package/dist/cjs/classes/refmap.js.map +0 -1
- package/dist/cjs/classes/refset.d.ts +0 -186
- package/dist/cjs/classes/refset.js +0 -370
- package/dist/cjs/classes/refset.js.map +0 -1
- package/dist/cjs/classes/symkeys.d.ts +0 -349
- package/dist/cjs/classes/symkeys.js +0 -510
- package/dist/cjs/classes/symkeys.js.map +0 -1
- package/dist/cjs/classes/type.d.ts +0 -56
- package/dist/cjs/classes/type.js +0 -405
- package/dist/cjs/classes/type.js.map +0 -1
- package/dist/cjs/function.extensions.d.ts +0 -12
- package/dist/cjs/function.extensions.js +0 -758
- package/dist/cjs/function.extensions.js.map +0 -1
- package/dist/cjs/global.this.d.ts +0 -2
- package/dist/cjs/global.this.js +0 -300
- package/dist/cjs/global.this.js.map +0 -1
- package/dist/cjs/index.d.ts +0 -31
- package/dist/cjs/index.js +0 -226
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/json.extensions.d.ts +0 -2
- package/dist/cjs/json.extensions.js +0 -109
- package/dist/cjs/json.extensions.js.map +0 -1
- package/dist/cjs/map.extensions.d.ts +0 -3
- package/dist/cjs/map.extensions.js +0 -143
- package/dist/cjs/map.extensions.js.map +0 -1
- package/dist/cjs/number.extension.d.ts +0 -44
- package/dist/cjs/number.extension.js +0 -261
- package/dist/cjs/number.extension.js.map +0 -1
- package/dist/cjs/object.extensions.d.ts +0 -33
- package/dist/cjs/object.extensions.js +0 -1091
- package/dist/cjs/object.extensions.js.map +0 -1
- package/dist/cjs/package.json +0 -3
- package/dist/cjs/proxy.extensions.d.ts +0 -2
- package/dist/cjs/proxy.extensions.js +0 -207
- package/dist/cjs/proxy.extensions.js.map +0 -1
- package/dist/cjs/reflect.extensions.d.ts +0 -14
- package/dist/cjs/reflect.extensions.js +0 -316
- package/dist/cjs/reflect.extensions.js.map +0 -1
- package/dist/cjs/regular.expression.extensions.d.ts +0 -2
- package/dist/cjs/regular.expression.extensions.js +0 -423
- package/dist/cjs/regular.expression.extensions.js.map +0 -1
- package/dist/cjs/set.extensions.d.ts +0 -40
- package/dist/cjs/set.extensions.js +0 -355
- package/dist/cjs/set.extensions.js.map +0 -1
- package/dist/cjs/string.extensions.d.ts +0 -23
- package/dist/cjs/string.extensions.js +0 -704
- package/dist/cjs/string.extensions.js.map +0 -1
- package/dist/cjs/symbol.extensions.d.ts +0 -11
- package/dist/cjs/symbol.extensions.js +0 -735
- package/dist/cjs/symbol.extensions.js.map +0 -1
- package/dist/cjs/utils/copy.object.d.ts +0 -408
- package/dist/cjs/utils/copy.object.js +0 -720
- package/dist/cjs/utils/copy.object.js.map +0 -1
- package/dist/cjs/utils/descriptor.utils.d.ts +0 -298
- package/dist/cjs/utils/descriptor.utils.js +0 -889
- package/dist/cjs/utils/descriptor.utils.js.map +0 -1
- package/dist/cjs/utils/index.d.ts +0 -75
- package/dist/cjs/utils/index.js +0 -61
- package/dist/cjs/utils/index.js.map +0 -1
- package/dist/cjs/utils/stdout.d.ts +0 -742
- package/dist/cjs/utils/stdout.js +0 -1042
- package/dist/cjs/utils/stdout.js.map +0 -1
- package/dist/cjs/utils/toolkit.d.ts +0 -1898
- package/dist/cjs/utils/toolkit.js +0 -1378
- package/dist/cjs/utils/toolkit.js.map +0 -1
- package/dist/cjs/weakref.extensions.d.ts +0 -2
- package/dist/cjs/weakref.extensions.js +0 -19
- package/dist/cjs/weakref.extensions.js.map +0 -1
- package/dist/mjs/array.extensions.d.ts +0 -39
- package/dist/mjs/array.extensions.js +0 -474
- package/dist/mjs/array.extensions.js.map +0 -1
- package/dist/mjs/big.int.extension.d.ts +0 -31
- package/dist/mjs/big.int.extension.js +0 -162
- package/dist/mjs/big.int.extension.js.map +0 -1
- package/dist/mjs/classes/asyncIterable.d.ts +0 -126
- package/dist/mjs/classes/asyncIterable.js +0 -204
- package/dist/mjs/classes/asyncIterable.js.map +0 -1
- package/dist/mjs/classes/deferred.d.ts +0 -146
- package/dist/mjs/classes/deferred.js +0 -287
- package/dist/mjs/classes/deferred.js.map +0 -1
- package/dist/mjs/classes/descriptor.d.ts +0 -334
- package/dist/mjs/classes/descriptor.js +0 -533
- package/dist/mjs/classes/descriptor.js.map +0 -1
- package/dist/mjs/classes/enum.d.ts +0 -50
- package/dist/mjs/classes/enum.js +0 -400
- package/dist/mjs/classes/enum.js.map +0 -1
- package/dist/mjs/classes/index.d.ts +0 -15
- package/dist/mjs/classes/index.js +0 -46
- package/dist/mjs/classes/index.js.map +0 -1
- package/dist/mjs/classes/introspector.d.ts +0 -20
- package/dist/mjs/classes/introspector.js +0 -126
- package/dist/mjs/classes/introspector.js.map +0 -1
- package/dist/mjs/classes/iterable.d.ts +0 -169
- package/dist/mjs/classes/iterable.js +0 -263
- package/dist/mjs/classes/iterable.js.map +0 -1
- package/dist/mjs/classes/param.parser.d.ts +0 -221
- package/dist/mjs/classes/param.parser.js +0 -238
- package/dist/mjs/classes/param.parser.js.map +0 -1
- package/dist/mjs/classes/pluggable.proxy.d.ts +0 -153
- package/dist/mjs/classes/pluggable.proxy.js +0 -438
- package/dist/mjs/classes/pluggable.proxy.js.map +0 -1
- package/dist/mjs/classes/property.d.ts +0 -79
- package/dist/mjs/classes/property.js +0 -280
- package/dist/mjs/classes/property.js.map +0 -1
- package/dist/mjs/classes/refmap.d.ts +0 -238
- package/dist/mjs/classes/refmap.js +0 -417
- package/dist/mjs/classes/refmap.js.map +0 -1
- package/dist/mjs/classes/refset.d.ts +0 -186
- package/dist/mjs/classes/refset.js +0 -366
- package/dist/mjs/classes/refset.js.map +0 -1
- package/dist/mjs/classes/symkeys.d.ts +0 -349
- package/dist/mjs/classes/symkeys.js +0 -506
- package/dist/mjs/classes/symkeys.js.map +0 -1
- package/dist/mjs/classes/type.d.ts +0 -56
- package/dist/mjs/classes/type.js +0 -401
- package/dist/mjs/classes/type.js.map +0 -1
- package/dist/mjs/function.extensions.d.ts +0 -12
- package/dist/mjs/function.extensions.js +0 -755
- package/dist/mjs/function.extensions.js.map +0 -1
- package/dist/mjs/global.this.d.ts +0 -2
- package/dist/mjs/global.this.js +0 -264
- package/dist/mjs/global.this.js.map +0 -1
- package/dist/mjs/index.d.ts +0 -31
- package/dist/mjs/index.js +0 -204
- package/dist/mjs/index.js.map +0 -1
- package/dist/mjs/json.extensions.d.ts +0 -2
- package/dist/mjs/json.extensions.js +0 -106
- package/dist/mjs/json.extensions.js.map +0 -1
- package/dist/mjs/map.extensions.d.ts +0 -3
- package/dist/mjs/map.extensions.js +0 -140
- package/dist/mjs/map.extensions.js.map +0 -1
- package/dist/mjs/number.extension.d.ts +0 -44
- package/dist/mjs/number.extension.js +0 -258
- package/dist/mjs/number.extension.js.map +0 -1
- package/dist/mjs/object.extensions.d.ts +0 -33
- package/dist/mjs/object.extensions.js +0 -1088
- package/dist/mjs/object.extensions.js.map +0 -1
- package/dist/mjs/package.json +0 -3
- package/dist/mjs/proxy.extensions.d.ts +0 -2
- package/dist/mjs/proxy.extensions.js +0 -204
- package/dist/mjs/proxy.extensions.js.map +0 -1
- package/dist/mjs/reflect.extensions.d.ts +0 -14
- package/dist/mjs/reflect.extensions.js +0 -313
- package/dist/mjs/reflect.extensions.js.map +0 -1
- package/dist/mjs/regular.expression.extensions.d.ts +0 -2
- package/dist/mjs/regular.expression.extensions.js +0 -420
- package/dist/mjs/regular.expression.extensions.js.map +0 -1
- package/dist/mjs/set.extensions.d.ts +0 -40
- package/dist/mjs/set.extensions.js +0 -352
- package/dist/mjs/set.extensions.js.map +0 -1
- package/dist/mjs/string.extensions.d.ts +0 -23
- package/dist/mjs/string.extensions.js +0 -701
- package/dist/mjs/string.extensions.js.map +0 -1
- package/dist/mjs/symbol.extensions.d.ts +0 -11
- package/dist/mjs/symbol.extensions.js +0 -732
- package/dist/mjs/symbol.extensions.js.map +0 -1
- package/dist/mjs/utils/copy.object.d.ts +0 -408
- package/dist/mjs/utils/copy.object.js +0 -702
- package/dist/mjs/utils/copy.object.js.map +0 -1
- package/dist/mjs/utils/descriptor.utils.d.ts +0 -298
- package/dist/mjs/utils/descriptor.utils.js +0 -875
- package/dist/mjs/utils/descriptor.utils.js.map +0 -1
- package/dist/mjs/utils/index.d.ts +0 -75
- package/dist/mjs/utils/index.js +0 -45
- package/dist/mjs/utils/index.js.map +0 -1
- package/dist/mjs/utils/stdout.d.ts +0 -742
- package/dist/mjs/utils/stdout.js +0 -1037
- package/dist/mjs/utils/stdout.js.map +0 -1
- package/dist/mjs/utils/toolkit.d.ts +0 -1898
- package/dist/mjs/utils/toolkit.js +0 -1373
- package/dist/mjs/utils/toolkit.js.map +0 -1
- package/dist/mjs/weakref.extensions.d.ts +0 -2
- package/dist/mjs/weakref.extensions.js +0 -16
- package/dist/mjs/weakref.extensions.js.map +0 -1
- package/jsdoc-config.json +0 -31
- package/tsconfig.base.json +0 -28
- package/tsconfig.cjs.json +0 -8
- package/tsconfig.esm.json +0 -8
- package/vitest.config.js +0 -7
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RefSetExtensions = exports.RefSet = void 0;
|
|
4
|
-
const extension_1 = require("@nejs/extension");
|
|
5
|
-
/**
|
|
6
|
-
* RefSet class extends the standard Set object to manage a collection of
|
|
7
|
-
* WeakRef objects. It provides additional functionality such as objectification
|
|
8
|
-
* of values and various utility methods.
|
|
9
|
-
*
|
|
10
|
-
* Unlike standard Sets or Arrays, RefSet stores weak references to objects,
|
|
11
|
-
* allowing them to be garbage-collected if there are no other references to
|
|
12
|
-
* them. This behavior is different from Arrays and standard Sets, which
|
|
13
|
-
* maintain strong references to their elements.
|
|
14
|
-
*
|
|
15
|
-
* @extends Set
|
|
16
|
-
*/
|
|
17
|
-
class RefSet extends Set {
|
|
18
|
-
/**
|
|
19
|
-
* Private field to track whether the RefSet should objectify primitive
|
|
20
|
-
* values.
|
|
21
|
-
*
|
|
22
|
-
* @private
|
|
23
|
-
*/
|
|
24
|
-
#objectifyValues = false;
|
|
25
|
-
/**
|
|
26
|
-
* Method to control whether the RefSet should objectify its values. When
|
|
27
|
-
* objectifying, primitive values (number, string, boolean, bigint) are
|
|
28
|
-
* converted to their respective object types, which allows them to be used as
|
|
29
|
-
* WeakRef targets.
|
|
30
|
-
*
|
|
31
|
-
* @param {boolean} setObjectification - Flag to enable or disable
|
|
32
|
-
* objectification.
|
|
33
|
-
* @returns {RefSet} - The current RefSet instance to allow method chaining.
|
|
34
|
-
*/
|
|
35
|
-
objectifying(setObjectification = true) {
|
|
36
|
-
this.objectifyValues = setObjectification;
|
|
37
|
-
return this;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Returns the state indicating whether or not `RefSet` will attempt to
|
|
41
|
-
* convert non-valid primitives into targets that are valid input for
|
|
42
|
-
* new `WeakRef` object instances. If this value is `false` then no
|
|
43
|
-
* *objectification* will occur.
|
|
44
|
-
*
|
|
45
|
-
* @returns {boolean} The current state of objectifyValues.
|
|
46
|
-
*/
|
|
47
|
-
get objectifyValues() {
|
|
48
|
-
return this.#objectifyValues;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Setting this value to true, will cause all added values to the Set to
|
|
52
|
-
* be analyzed for validity as a candidate to be wrapped in a `WeakRef`
|
|
53
|
-
* object. If true, and if possible, the object will be turned into an
|
|
54
|
-
* `Object` variant first. This will also enable less rigid variable
|
|
55
|
-
* comparison in the `.has()` method (i.e. `==` instead of `===`).
|
|
56
|
-
*
|
|
57
|
-
* @param {boolean} value - The new state to set for objectifyValues.
|
|
58
|
-
*/
|
|
59
|
-
set objectifyValues(value) {
|
|
60
|
-
this.#objectifyValues = !!value;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Overrides the add method of Set. Adds a value to the RefSet, converting it
|
|
64
|
-
* to a WeakRef. Throws an error if the value is not a valid WeakRef target
|
|
65
|
-
* (e.g., null, undefined, or a registered symbol). If `objectifyValues` is
|
|
66
|
-
* enabled, an attempt to convert primitives to their object variants will be
|
|
67
|
-
* made. These are numbers, strings, boolean values and big integers.
|
|
68
|
-
*
|
|
69
|
-
* @param {*} value - The value to be added to the RefSet.
|
|
70
|
-
* @throws {TypeError} If the value is not a valid WeakRef target.
|
|
71
|
-
*/
|
|
72
|
-
add(value) {
|
|
73
|
-
// Objectify the value if needed
|
|
74
|
-
if (this.#objectifyValues && (typeof value === 'number' ||
|
|
75
|
-
typeof value === 'string' ||
|
|
76
|
-
typeof value === 'boolean' ||
|
|
77
|
-
typeof value === 'bigint')) {
|
|
78
|
-
value = Object(value);
|
|
79
|
-
}
|
|
80
|
-
// Check if the value is an object, and if it's a symbol, ensure it's not registered
|
|
81
|
-
if (typeof value === 'symbol' && Symbol.keyFor(value) !== undefined) {
|
|
82
|
-
throw new TypeError('RefSet cannot accept registered symbols as values');
|
|
83
|
-
}
|
|
84
|
-
if (typeof value !== 'object' && typeof value !== 'symbol') {
|
|
85
|
-
throw new TypeError('RefSet values must be objects, non-registered symbols, or objectified primitives');
|
|
86
|
-
}
|
|
87
|
-
// If the value is null or undefined, throw an error
|
|
88
|
-
if (value === null || value === undefined) {
|
|
89
|
-
throw new TypeError('RefSet values cannot be null or undefined');
|
|
90
|
-
}
|
|
91
|
-
super.add(new WeakRef(value));
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Adds multiple values to the RefSet. The supplied `values` should be
|
|
95
|
-
* iterable and truthy. This function defers to `.add()` for its logic so
|
|
96
|
-
* each value from the supplied collection of values will also be subject
|
|
97
|
-
* to the criteria of that function.
|
|
98
|
-
*
|
|
99
|
-
* @param {Iterable} values - An iterable of values to add to the RefSet.
|
|
100
|
-
* @throws {TypeError} If the supplied values are falsey or non-iterable.
|
|
101
|
-
*/
|
|
102
|
-
addAll(values) {
|
|
103
|
-
if (!values ||
|
|
104
|
-
(typeof values !== 'object') ||
|
|
105
|
-
!Reflect.has(values, Symbol.iterator)) {
|
|
106
|
-
throw new TypeError('The supplied values are either falsey or non-iterable');
|
|
107
|
-
}
|
|
108
|
-
for (const value of values) {
|
|
109
|
-
this.add(value);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Removes all elements from the RefSet that have been garbage collected
|
|
114
|
-
* (i.e., their WeakRef no longer points to an object).
|
|
115
|
-
*
|
|
116
|
-
* @returns {RefSet} - The current RefSet instance to allow method chaining.
|
|
117
|
-
*/
|
|
118
|
-
clean() {
|
|
119
|
-
for (const ref of this) {
|
|
120
|
-
if (!ref.deref()) {
|
|
121
|
-
this.delete(ref);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
return this;
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Executes a provided function once for each value in the RefSet. The callback
|
|
128
|
-
* function receives the dereferenced value, the value again (as RefSet doesn't
|
|
129
|
-
* use keys), and the RefSet itself. This method provides a way to iterate over
|
|
130
|
-
* and apply operations to the values stored in the RefSet, taking into account
|
|
131
|
-
* that they are weak references and may have been garbage-collected.
|
|
132
|
-
*
|
|
133
|
-
* @param {Function} forEachFn - Function to execute for each element. It
|
|
134
|
-
* takes three arguments: element, element (again, as RefSet has no key), and
|
|
135
|
-
* the RefSet itself.
|
|
136
|
-
* @param {*} thisArg - Value to use as `this` when executing `forEachFn`.
|
|
137
|
-
*/
|
|
138
|
-
entries() {
|
|
139
|
-
const refEntries = Array.from(super.entries());
|
|
140
|
-
return refEntries
|
|
141
|
-
.map(([_, ref]) => [ref.deref(), ref.deref()])
|
|
142
|
-
.filter(([_, value]) => !!value);
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Iterate over the items in the set and pass them to the supplied
|
|
146
|
-
* function ala `Array.prototype.forEach`. Note however, there are no
|
|
147
|
-
* indexes on Sets and as such, the index parameter of the callback
|
|
148
|
-
* will always be `NaN`. Subsequently the `array` or third parameter
|
|
149
|
-
* will receive the set instance rather than an array.
|
|
150
|
-
*
|
|
151
|
-
* @param {function} forEachFn the function to use for each element in
|
|
152
|
-
* the set.
|
|
153
|
-
* @param {object} thisArg the `this` argument to be applied to each
|
|
154
|
-
* invocation of the `forEachFn` callback. Note, this value is unable
|
|
155
|
-
* to be applied if the `forEachFn` is a big arrow function
|
|
156
|
-
*/
|
|
157
|
-
forEach(forEachFn, thisArg) {
|
|
158
|
-
const set = this;
|
|
159
|
-
super.forEach(function (ref) {
|
|
160
|
-
const value = ref.deref();
|
|
161
|
-
if (!value) {
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
forEachFn.call(thisArg, value, value, set);
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Returns an iterator for the values in the RefSet. Each value is
|
|
169
|
-
* dereferenced from its WeakRef before being returned. This method allows
|
|
170
|
-
* iterating over he set's values, similar to how one would iterate over
|
|
171
|
-
* values in a standard Set or Array, but with the understanding that the
|
|
172
|
-
* values are weakly referenced and may no longer exist (in which case
|
|
173
|
-
* they are skipped).
|
|
174
|
-
*
|
|
175
|
-
* @returns {Iterator} An iterator for the values.
|
|
176
|
-
*/
|
|
177
|
-
values() {
|
|
178
|
-
const values = [];
|
|
179
|
-
for (const value of this) {
|
|
180
|
-
const dereferenced = value.deref();
|
|
181
|
-
if (dereferenced) {
|
|
182
|
-
values.push(dereferenced);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
return values;
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Returns an iterator for the keys of the RefSet. In RefSet, keys and
|
|
189
|
-
* values are identical, so this method behaves the same as `values()`. It
|
|
190
|
-
* provides compatibility with the standard Set interface and allows use in
|
|
191
|
-
* contexts where keys are expected, despite RefSet not differentiating
|
|
192
|
-
* between keys and values.
|
|
193
|
-
*
|
|
194
|
-
* @returns {Iterator} An iterator for the keys.
|
|
195
|
-
*/
|
|
196
|
-
keys() {
|
|
197
|
-
return this.values();
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Determines whether an element with the specified value exists in the
|
|
201
|
-
* `RefSet`. For non-objectified sets, this method checks if the dereferenced
|
|
202
|
-
* values of the set include the specified value.
|
|
203
|
-
*
|
|
204
|
-
* For objectified sets, it uses the `contains` method which accounts for
|
|
205
|
-
* the objectification. This method differs from standard Set `has` in that
|
|
206
|
-
* it works with weak references and considers objectification settings.
|
|
207
|
-
*
|
|
208
|
-
* @param {*} value - The value to check for presence in the RefSet.
|
|
209
|
-
* @returns {boolean} - True if an element with the specified value exists
|
|
210
|
-
* in the RefSet, false otherwise.
|
|
211
|
-
*/
|
|
212
|
-
has(value) {
|
|
213
|
-
if (this.#objectifyValues) {
|
|
214
|
-
return this.contains(value);
|
|
215
|
-
}
|
|
216
|
-
for (const item of this.values()) {
|
|
217
|
-
if (item === value) {
|
|
218
|
-
return true;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
return false;
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Checks if the RefSet contains a value that is equal to the specified
|
|
225
|
-
* value. This method is used primarily in objectified RefSets to determine
|
|
226
|
-
* the presence of a value, taking into account objectification. It differs
|
|
227
|
-
* from the `has` method in that it's tailored for sets that have
|
|
228
|
-
* transformed their primitive values into objects, whereas `has` is more
|
|
229
|
-
* general-purpose.
|
|
230
|
-
*
|
|
231
|
-
* @param {*} value - The value to search for in the RefSet.
|
|
232
|
-
* @returns {boolean} - True if the RefSet contains the value, false otherwise.
|
|
233
|
-
*/
|
|
234
|
-
contains(value) {
|
|
235
|
-
return !!(Array.from(this.values())
|
|
236
|
-
.filter(dereferencedValue => {
|
|
237
|
-
return value == dereferencedValue;
|
|
238
|
-
})
|
|
239
|
-
.length);
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Creates a new array with all elements that pass the test implemented by
|
|
243
|
-
* the provided function. This method iterates over each element,
|
|
244
|
-
* dereferences it, and applies the filter function. Unlike Array `filter`,
|
|
245
|
-
* the callback receives the dereferenced value and not an index or array,
|
|
246
|
-
* reflecting the non-indexed nature of RefSet. Useful for selectively
|
|
247
|
-
* creating arrays from the set based on certain conditions, especially when
|
|
248
|
-
* dealing with weak references.
|
|
249
|
-
*
|
|
250
|
-
* @param {Function} filterFn - Function to test each element of the RefSet.
|
|
251
|
-
* The function receives the dereferenced value.
|
|
252
|
-
* @param {*} thisArg - Value to use as `this` when executing `filterFn`.
|
|
253
|
-
* @returns {Array} - A new array with the elements that pass the test.
|
|
254
|
-
*/
|
|
255
|
-
filter(filterFn, thisArg) {
|
|
256
|
-
const results = [];
|
|
257
|
-
for (const value of this) {
|
|
258
|
-
const dereferenced = value?.deref();
|
|
259
|
-
if (dereferenced) {
|
|
260
|
-
const include = filterFn.call(thisArg, dereferenced, NaN, this);
|
|
261
|
-
if (include) {
|
|
262
|
-
results.push(dereferenced);
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
return results;
|
|
267
|
-
}
|
|
268
|
-
/**
|
|
269
|
-
* Returns the value of the first element in the RefSet that satisfies the
|
|
270
|
-
* provided testing function. Similar to Array `find`, this method iterates
|
|
271
|
-
* over the RefSet, dereferencing each value and applying the testing
|
|
272
|
-
* function. The non-indexed nature of RefSet is considered, as the
|
|
273
|
-
* callback does not receive an index. This method is useful for finding a
|
|
274
|
-
* specific element based on a condition.
|
|
275
|
-
*
|
|
276
|
-
* @param {*} thisArg - Value to use as this when executing findFn.
|
|
277
|
-
* @returns {*} - The value of the first element in the RefSet that satisfies
|
|
278
|
-
* the testing function, or undefined if none found.
|
|
279
|
-
* @returns {any} the dereferenced value if found, or undefined otherwise
|
|
280
|
-
*/
|
|
281
|
-
find(findFn, thisArg) {
|
|
282
|
-
for (const value of this) {
|
|
283
|
-
const dereferenced = value?.deref();
|
|
284
|
-
if (dereferenced) {
|
|
285
|
-
const found = findFn.call(thisArg, dereferenced, NaN, this);
|
|
286
|
-
if (found) {
|
|
287
|
-
return dereferenced;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
return undefined;
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* Creates a new array or `RefSet` with the results of calling a provided
|
|
295
|
-
* function on every element in the calling `RefSet`. This method dereferences
|
|
296
|
-
* each value, applies the `mapFn`, and collects the results. If `toRefSet` is
|
|
297
|
-
* `true`, a new `RefSet` is returned; otherwise, an array. This method
|
|
298
|
-
* differs from `Array.map` in handling weak references and the potential to
|
|
299
|
-
* return a new `RefSet` instead of an array.
|
|
300
|
-
*
|
|
301
|
-
* @param {Function} mapFn - Function that produces an element of the new
|
|
302
|
-
* array or `RefSet`, taking three arguments.
|
|
303
|
-
* @param {*} thisArg - Value to use as this when executing mapFn.
|
|
304
|
-
* @param {boolean} toRefSet - Determines if the output should be a new
|
|
305
|
-
* `RefSet` (`true`) or an array (`false`).
|
|
306
|
-
* @param {boolean} mirrorObjectification - If `true` and `toRefSet` is
|
|
307
|
-
* `true`, the new `RefSet` mirrors the objectification setting of the
|
|
308
|
-
* original.
|
|
309
|
-
* @returns {Array|RefSet} - A new array or `RefSet` with each element being
|
|
310
|
-
* the result of the `mapFn`.
|
|
311
|
-
*/
|
|
312
|
-
map(mapFn, thisArg, toRefSet, mirrorObjectification) {
|
|
313
|
-
const mapped = [];
|
|
314
|
-
let validRefSetOutput = true;
|
|
315
|
-
let validRefSetOutputIfObjectified = true;
|
|
316
|
-
for (const value of this) {
|
|
317
|
-
const dereferenced = value?.deref();
|
|
318
|
-
if (dereferenced) {
|
|
319
|
-
const mappedItem = mapFn.call(thisArg, dereferenced, NaN, this);
|
|
320
|
-
if (validRefSetOutput || validRefSetOutputIfObjectified) {
|
|
321
|
-
const weakReferenceable = this.#validWeakRefTarget(mappedItem);
|
|
322
|
-
if (!weakReferenceable) {
|
|
323
|
-
validRefSetOutput = false;
|
|
324
|
-
if (validRefSetOutputIfObjectified) {
|
|
325
|
-
validRefSetOutputIfObjectified =
|
|
326
|
-
this.#validWeakRefTarget(Object(mappedItem));
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
mapped.push(mappedItem);
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
if (toRefSet) {
|
|
334
|
-
if (validRefSetOutput) {
|
|
335
|
-
return new RefSet(mapped).objectifying(mirrorObjectification ? this.objectifyValues : false);
|
|
336
|
-
}
|
|
337
|
-
if (validRefSetOutputIfObjectified) {
|
|
338
|
-
return new RefSet(mapped.map(value => {
|
|
339
|
-
return this.#validWeakRefTarget(value) ? value : Object(value);
|
|
340
|
-
})).objectifying();
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
return mapped;
|
|
344
|
-
}
|
|
345
|
-
/**
|
|
346
|
-
* Ensures that the constructor of this object instance's name
|
|
347
|
-
* is returned if the string tag for this instance is queried
|
|
348
|
-
*
|
|
349
|
-
* @returns {string} the name of the class
|
|
350
|
-
*/
|
|
351
|
-
get [Symbol.toStringTag]() {
|
|
352
|
-
return this.constructor.name;
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* Private method to check if a given value is a valid target for a WeakRef.
|
|
356
|
-
*
|
|
357
|
-
* @param {*} value - The value to check for validity as a WeakRef target.
|
|
358
|
-
* @returns {boolean} - True if the value is a valid WeakRef target,
|
|
359
|
-
* false otherwise.
|
|
360
|
-
* @private
|
|
361
|
-
*/
|
|
362
|
-
#validWeakRefTarget(value) {
|
|
363
|
-
return !((typeof value === 'symbol' && Symbol.keyFor(value) === undefined) ||
|
|
364
|
-
(typeof value !== 'object' && typeof value !== 'symbol') ||
|
|
365
|
-
(value === null || value === undefined));
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
exports.RefSet = RefSet;
|
|
369
|
-
exports.RefSetExtensions = new extension_1.Extension(RefSet);
|
|
370
|
-
//# sourceMappingURL=refset.js.map
|
|
@@ -1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