@nejs/basic-extensions 2.20.0 → 2.21.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/.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/bin/repl.basics.js +36 -6
- package/bin/repl.signature.js +63 -0
- package/dist/@nejs/basic-extensions.bundle.2.21.5.js +25 -0
- package/dist/@nejs/basic-extensions.bundle.2.21.5.js.map +7 -0
- package/dist/cjs/big.int.extension.js +153 -45
- package/dist/cjs/big.int.extension.js.map +1 -1
- package/dist/cjs/classes/descriptor.d.ts +1 -1
- package/dist/cjs/classes/enum.d.ts +37 -19
- package/dist/cjs/classes/enum.js +181 -56
- package/dist/cjs/classes/enum.js.map +1 -1
- package/dist/cjs/classes/iterable.d.ts +3 -3
- package/dist/cjs/classes/param.parser.d.ts +1 -7
- package/dist/cjs/classes/pluggable.proxy.d.ts +2 -1
- package/dist/cjs/classes/property.d.ts +2 -9
- package/dist/cjs/classes/refset.d.ts +2 -2
- package/dist/cjs/classes/symkeys.d.ts +1 -1
- package/dist/cjs/global.this.js +17 -7
- package/dist/cjs/global.this.js.map +1 -1
- package/dist/cjs/index.d.ts +9 -6
- package/dist/cjs/index.js +15 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/math.extension.d.ts +14 -0
- package/dist/cjs/math.extension.js +71 -0
- package/dist/cjs/math.extension.js.map +1 -0
- package/dist/cjs/number.extension.js +17 -0
- package/dist/cjs/number.extension.js.map +1 -1
- package/dist/cjs/string.extensions.js +38 -0
- package/dist/cjs/string.extensions.js.map +1 -1
- package/dist/cjs/utils/copy.object.d.ts +2 -2
- package/dist/cjs/utils/descriptor.utils.d.ts +152 -0
- package/dist/cjs/utils/descriptor.utils.js +228 -9
- package/dist/cjs/utils/descriptor.utils.js.map +1 -1
- package/dist/cjs/utils/index.d.ts +15 -0
- package/dist/cjs/utils/index.js +9 -0
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/stdout.d.ts +742 -0
- package/dist/cjs/utils/stdout.js +1042 -0
- package/dist/cjs/utils/stdout.js.map +1 -0
- package/dist/mjs/big.int.extension.js +153 -45
- package/dist/mjs/big.int.extension.js.map +1 -1
- package/dist/mjs/classes/descriptor.d.ts +1 -1
- package/dist/mjs/classes/enum.d.ts +37 -19
- package/dist/mjs/classes/enum.js +181 -57
- package/dist/mjs/classes/enum.js.map +1 -1
- package/dist/mjs/classes/iterable.d.ts +3 -3
- package/dist/mjs/classes/param.parser.d.ts +1 -7
- package/dist/mjs/classes/pluggable.proxy.d.ts +2 -1
- package/dist/mjs/classes/property.d.ts +2 -9
- package/dist/mjs/classes/refset.d.ts +2 -2
- package/dist/mjs/classes/symkeys.d.ts +1 -1
- package/dist/mjs/index.d.ts +9 -6
- package/dist/mjs/index.js +15 -8
- package/dist/mjs/index.js.map +1 -1
- package/dist/mjs/math.extension.d.ts +14 -0
- package/dist/mjs/math.extension.js +68 -0
- package/dist/mjs/math.extension.js.map +1 -0
- package/dist/mjs/number.extension.js +17 -0
- package/dist/mjs/number.extension.js.map +1 -1
- package/dist/mjs/string.extensions.js +38 -0
- package/dist/mjs/string.extensions.js.map +1 -1
- package/dist/mjs/utils/copy.object.d.ts +2 -2
- package/dist/mjs/utils/descriptor.utils.d.ts +152 -0
- package/dist/mjs/utils/descriptor.utils.js +222 -9
- package/dist/mjs/utils/descriptor.utils.js.map +1 -1
- package/dist/mjs/utils/index.d.ts +15 -0
- package/dist/mjs/utils/index.js +10 -1
- package/dist/mjs/utils/index.js.map +1 -1
- package/dist/mjs/utils/stdout.d.ts +742 -0
- package/dist/mjs/utils/stdout.js +1037 -0
- package/dist/mjs/utils/stdout.js.map +1 -0
- package/package.json +6 -20
- package/repl.bootstrap.js +24 -16
- package/repl.history +30 -30
- package/src/big.int.extension.js +171 -45
- package/src/classes/enum.js +249 -109
- package/src/index.js +24 -8
- package/src/math.extension.js +73 -0
- package/src/number.extension.js +18 -0
- package/src/string.extensions.js +41 -0
- package/src/utils/descriptor.utils.js +277 -9
- package/src/utils/index.js +20 -0
- package/src/utils/stdout.js +1151 -0
- package/tests/utils/descriptor.utils.test.js +130 -0
- package/dist/@nejs/basic-extensions.bundle.2.20.0.js +0 -19
- package/dist/@nejs/basic-extensions.bundle.2.20.0.js.map +0 -7
|
@@ -17,51 +17,117 @@ const extension_1 = require("@nejs/extension");
|
|
|
17
17
|
* // Now the `BigInt` class has additional methods available
|
|
18
18
|
*/
|
|
19
19
|
exports.BigIntExtensions = new extension_1.Patch(BigInt, {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
20
|
+
[extension_1.Patch.kMutablyHidden]: {
|
|
21
|
+
/**
|
|
22
|
+
* Checks if all or some of the supplied values are numbers.
|
|
23
|
+
*
|
|
24
|
+
* This method uses the `Array.prototype.every` or `Array.prototype.some`
|
|
25
|
+
* method to check if all or some of the supplied values are numbers,
|
|
26
|
+
* respectively. The method to use is determined by the `which` parameter.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} [which='every'] - Determines the method to use for the
|
|
29
|
+
* check. Can be either 'every' or 'some'. Defaults to 'every'.
|
|
30
|
+
* @param {...*} values - The values to check.
|
|
31
|
+
* @returns {boolean} - Returns `true` if all or some of the values are
|
|
32
|
+
* numbers (based on the `which` parameter), `false` otherwise.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* areNumbers('every', 1, 2, 3) // true
|
|
36
|
+
* areNumbers('some', 1, '2', 3) // true
|
|
37
|
+
* areNumbers('every', 1, '2', 3) // false
|
|
38
|
+
*/
|
|
39
|
+
areBigInts(which = ['every', 'some'][0], ...values) {
|
|
40
|
+
if (which !== 'every' && which !== 'some') {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
return values[which](num => this.isBigInt(num));
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* Determines if the supplied `value` is a `BigInt`. This check is
|
|
47
|
+
* performed by first checking the `typeof` the `value` and then
|
|
48
|
+
* checking to see if the `value` is an `instanceof` `BigInt`
|
|
49
|
+
*
|
|
50
|
+
* @param {*} value The value that needs to be checked to determine
|
|
51
|
+
* if it is a `BigInt` or not
|
|
52
|
+
* @returns {boolean} `true` if the supplied `value` is a `BigInt`,
|
|
53
|
+
* `false` otherwise
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* const bigInt = 1234567890123456789012345678901234567890n
|
|
57
|
+
* isBigInt(bigInt) // true
|
|
58
|
+
* isBigInt(1234567890123456789012345678901234567890) // false
|
|
59
|
+
* isBigInt('1234567890123456789012345678901234567890') // false
|
|
60
|
+
* isBigInt(BigInt('1234567890123456789012345678901234567890')) // true
|
|
61
|
+
*/
|
|
62
|
+
isBigInt(value) {
|
|
63
|
+
return typeof value === 'bigint' || value instanceof BigInt;
|
|
64
|
+
},
|
|
65
|
+
/**
|
|
66
|
+
* Conditionally returns a value based on whether the supplied
|
|
67
|
+
* `value` is a `BigInt` or not. If the `value` is a `BigInt`,
|
|
68
|
+
* the `thenValue` will be returned. If it is not a `BigInt`,
|
|
69
|
+
* the `elseValue` will be returned instead.
|
|
70
|
+
*
|
|
71
|
+
* @param {any} value The value to check to determine if it is a
|
|
72
|
+
* `BigInt`
|
|
73
|
+
* @param {any} thenValue The value to return if the supplied
|
|
74
|
+
* `value` is a `BigInt`
|
|
75
|
+
* @param {any} elseValue The value to return if the supplied
|
|
76
|
+
* `value` is not a `BigInt`
|
|
77
|
+
* @returns {any} Either the `thenValue` or `elseValue` depending
|
|
78
|
+
* on if the supplied `value` is a `BigInt`
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* const bigInt = 1234567890123456789012345678901234567890n
|
|
82
|
+
* const num = 42
|
|
83
|
+
* ifBigInt(bigInt, 'is a BigInt', 'not a BigInt')
|
|
84
|
+
* // 'is a BigInt'
|
|
85
|
+
* ifBigInt(num, 'is a BigInt', 'not a BigInt')
|
|
86
|
+
* // 'not a BigInt'
|
|
87
|
+
*/
|
|
88
|
+
ifBigInt(value, thenValue, elseValue) {
|
|
89
|
+
return isThenElse(this.isBigInt(value), thenValue, elseValue);
|
|
90
|
+
},
|
|
91
|
+
/**
|
|
92
|
+
* The Math.min() static method returns the smallest of the numbers given
|
|
93
|
+
* as input parameters, or Infinity if there are no parameters.
|
|
94
|
+
*
|
|
95
|
+
* @param {bigint|number} values value1, …, valueN – Zero or more numbers
|
|
96
|
+
* among which the lowest value will be selected and returned.
|
|
97
|
+
* @returns {bigint|number|Infinity} The smallest of the given numbers.
|
|
98
|
+
* Returns Infinity if no parameters are provided.
|
|
99
|
+
*/
|
|
100
|
+
min(...values) {
|
|
101
|
+
const sorter = (l, r) => l < r ? -1 : l > r ? 1 : 0;
|
|
102
|
+
if (!values.length)
|
|
103
|
+
return Infinity;
|
|
104
|
+
if (values.every(n => typeof n === 'bigint')) {
|
|
105
|
+
return values.toSorted(sorter).at(0);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
throw new TypeError('All supplied values must be of type bigint');
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
/**
|
|
112
|
+
* The Math.max() static method returns the largest of the numbers given
|
|
113
|
+
* as input parameters, or Infinity if there are no parameters.
|
|
114
|
+
*
|
|
115
|
+
* @param {bigint|number} values value1, …, valueN – Zero or more numbers
|
|
116
|
+
* among which the largest value will be selected and returned.
|
|
117
|
+
* @returns {bigint|number|Infinity} The largest of the given numbers.
|
|
118
|
+
* Returns Infinity if no parameters are provided.
|
|
119
|
+
*/
|
|
120
|
+
max(...values) {
|
|
121
|
+
const sorter = (l, r) => l < r ? -1 : l > r ? 1 : 0;
|
|
122
|
+
if (!values.length)
|
|
123
|
+
return Infinity;
|
|
124
|
+
if (values.every(n => typeof n === 'bigint')) {
|
|
125
|
+
return values.toSorted(sorter).at(-1);
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
throw new TypeError('All supplied values must be of type bigint');
|
|
129
|
+
}
|
|
130
|
+
},
|
|
65
131
|
},
|
|
66
132
|
});
|
|
67
133
|
const { isBigInt: pIsBigInt, ifBigInt: pIfBigInt } = exports.BigIntExtensions.patches;
|
|
@@ -80,6 +146,31 @@ const { isBigInt: pIsBigInt, ifBigInt: pIfBigInt } = exports.BigIntExtensions.pa
|
|
|
80
146
|
* // Now the `BigInt` prototype has additional methods available
|
|
81
147
|
*/
|
|
82
148
|
exports.BigIntPrototypeExtensions = new extension_1.Patch(BigInt.prototype, {
|
|
149
|
+
/**
|
|
150
|
+
* Clamps a value between a minimum and maximum value.
|
|
151
|
+
*
|
|
152
|
+
* This method checks if the provided value and the min and max bounds are
|
|
153
|
+
* numbers. If they are not, it returns the original value. If they are,
|
|
154
|
+
* it ensures that the value does not go below the minimum value or above
|
|
155
|
+
* the maximum value.
|
|
156
|
+
*
|
|
157
|
+
* @param {bigint} [minValue=BigInt(-Number.MAX_VALUE)] - The minimum value.
|
|
158
|
+
* Defaults to BigInt(-Number.MAX_VALUE).
|
|
159
|
+
* @param {bigint} [maxValue=BigInt(Number.MAX_VALUE)] - The maximum value.
|
|
160
|
+
* Defaults to BigInt(Number.MAX_VALUE).
|
|
161
|
+
* @returns {bigint} - Returns the clamped value if all parameters are
|
|
162
|
+
* big integers.
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* (10n).clamp(1n, 5n) // returns 5n
|
|
166
|
+
* (-10n).clamp(1n, 5n) // returns 1n
|
|
167
|
+
* (3n).clamp(1n, 5n) // returns 3n
|
|
168
|
+
*/
|
|
169
|
+
clamp(minValue = BigInt(-Number.MAX_VALUE), maxValue = BigInt(Number.MAX_VALUE)) {
|
|
170
|
+
if (typeof minValue !== 'bigint' || typeof maxValue !== 'bigint')
|
|
171
|
+
throw new TypeError('All values must be big integers');
|
|
172
|
+
return BigInt.max(minValue, BigInt.min(maxValue, this));
|
|
173
|
+
},
|
|
83
174
|
/**
|
|
84
175
|
* A getter method that returns an object representation of the BigInt
|
|
85
176
|
* instance.
|
|
@@ -146,6 +237,23 @@ exports.BigIntPrototypeExtensions = new extension_1.Patch(BigInt.prototype, {
|
|
|
146
237
|
ifBigInt(thenValue, elseValue) {
|
|
147
238
|
return pIfBigInt(this, thenValue, elseValue);
|
|
148
239
|
},
|
|
240
|
+
/**
|
|
241
|
+
* Provides a way when dealing with numbers to determine if
|
|
242
|
+
* a given number is within a range of values. By default, if
|
|
243
|
+
* no parameters are supplied, it always returns true since
|
|
244
|
+
* the default range is -Infinity to +Infinity. Additionally,
|
|
245
|
+
* by default, the number will always be less than the supplied
|
|
246
|
+
* max unless inclusive is set to true.
|
|
247
|
+
*
|
|
248
|
+
* @param min the lower range value, defaults to -Infinity
|
|
249
|
+
* @param max the upper range value, defaults to +Infinity
|
|
250
|
+
* @param inclusive defaults to false, set to true if you
|
|
251
|
+
* want the max value to less than and equals to
|
|
252
|
+
* @returns {boolean} true if within the range, false otherwise
|
|
253
|
+
*/
|
|
254
|
+
within(min = BigInt(-Infinity), max = BigInt(Infinity), inclusive = false) {
|
|
255
|
+
return this >= min && (inclusive ? this <= max : this < max);
|
|
256
|
+
}
|
|
149
257
|
});
|
|
150
258
|
// NOTE to self; this is repeated here otherwise a circular reference from
|
|
151
259
|
// Object<->Function<->Global occurs. See original source in global.this.js
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"big.int.extension.js","sourceRoot":"","sources":["../../src/big.int.extension.js"],"names":[],"mappings":";;;AAAA,+CAAuC;AAEvC;;;;;;;;;;;;;GAaG;AACU,QAAA,gBAAgB,GAAG,IAAI,iBAAK,CAAC,MAAM,EAAE;IAChD;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"big.int.extension.js","sourceRoot":"","sources":["../../src/big.int.extension.js"],"names":[],"mappings":";;;AAAA,+CAAuC;AAEvC;;;;;;;;;;;;;GAaG;AACU,QAAA,gBAAgB,GAAG,IAAI,iBAAK,CAAC,MAAM,EAAE;IAChD,CAAC,iBAAK,CAAC,cAAc,CAAC,EAAE;QACtB;;;;;;;;;;;;;;;;;WAiBG;QACH,UAAU,CAAC,KAAK,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM;YAChD,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;gBAC1C,OAAO,KAAK,CAAA;YACd,CAAC;YAED,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAA;QACjD,CAAC;QAED;;;;;;;;;;;;;;;;WAgBG;QACH,QAAQ,CAAC,KAAK;YACZ,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,MAAM,CAAA;QAC7D,CAAC;QAED;;;;;;;;;;;;;;;;;;;;;;WAsBG;QACH,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS;YAClC,OAAO,UAAU,CAAC,IAAI,CA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,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC,CAAA;IAC9D,CAAC;CACF,CAAC,CAAA;AAEF,0EAA0E;AAC1E,2EAA2E;AAC3E,+BAA+B;AAC/B,SAAS,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;IAC5B,SAAS,UAAU,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,UAAU,CAAA,CAAC,CAAC;IAE1D,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,IAAI,KAAK,GAAG,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAAC,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACnE,IAAI,KAAK,GAAG,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAAC,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;QACrE,CAAC;QAAC,OAAO,EAAE,IAAI,KAAK,CAAC;IACvB,CAAC;IAAC,OAAO,EAAE,CAAA;AACb,CAAC"}
|
|
@@ -212,7 +212,7 @@ export class Descriptor {
|
|
|
212
212
|
* @throws {Error} Throws an error if the constructed descriptor is not
|
|
213
213
|
* valid.
|
|
214
214
|
*/
|
|
215
|
-
constructor(object: object | Descriptor, key?: string | symbol
|
|
215
|
+
constructor(object: object | Descriptor, key?: string | symbol, ...args: any[]);
|
|
216
216
|
/**
|
|
217
217
|
* The default private descriptor value is that of `enigmatic`
|
|
218
218
|
*
|
|
@@ -9,24 +9,42 @@
|
|
|
9
9
|
* @returns {Object} The constructed enumeration object.
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
|
-
* const colors = Enum('Colors', ['red', 'green', 'blue'])
|
|
13
|
-
* console.log(colors.red) // EnumValue object for 'red'
|
|
14
|
-
*
|
|
15
|
-
* @description
|
|
16
|
-
* The `Enum` function constructs an enumeration object with a given name,
|
|
17
|
-
* values, and optional properties. It supports primitive types, arrays,
|
|
18
|
-
* and objects as values. The function uses a combination of `Object.create`
|
|
19
|
-
* and `Proxy` to define and manage the properties of the enumeration.
|
|
20
|
-
*
|
|
21
|
-
* The enumeration object includes:
|
|
22
|
-
* - A `toString` method that returns the enumeration name.
|
|
23
|
-
* - A `Symbol.toStringTag` for identifying the object as an 'Enum'.
|
|
24
|
-
* - A `Symbol.for('Enum.name')` for storing the enumeration name.
|
|
25
|
-
*
|
|
26
|
-
* For array values, it creates a maker function that returns an
|
|
27
|
-
* `EnumValue` object with properties like `real`, `value`, `type`,
|
|
28
|
-
* `name`, and `compare`.
|
|
29
|
-
*/
|
|
30
|
-
export function Enum(name: string, values: any[] | any, properties?: Object | Map<any, any>
|
|
12
|
+
* const colors = Enum('Colors', ['red', 'green', 'blue'])
|
|
13
|
+
* console.log(colors.red) // EnumValue object for 'red'
|
|
14
|
+
*
|
|
15
|
+
* @description
|
|
16
|
+
* The `Enum` function constructs an enumeration object with a given name,
|
|
17
|
+
* values, and optional properties. It supports primitive types, arrays,
|
|
18
|
+
* and objects as values. The function uses a combination of `Object.create`
|
|
19
|
+
* and `Proxy` to define and manage the properties of the enumeration.
|
|
20
|
+
*
|
|
21
|
+
* The enumeration object includes:
|
|
22
|
+
* - A `toString` method that returns the enumeration name.
|
|
23
|
+
* - A `Symbol.toStringTag` for identifying the object as an 'Enum'.
|
|
24
|
+
* - A `Symbol.for('Enum.name')` for storing the enumeration name.
|
|
25
|
+
*
|
|
26
|
+
* For array values, it creates a maker function that returns an
|
|
27
|
+
* `EnumValue` object with properties like `real`, `value`, `type`,
|
|
28
|
+
* `name`, and `compare`.
|
|
29
|
+
*/
|
|
30
|
+
export function Enum(name: string, values: any[] | any, properties?: Object | Map<any, any>): Object;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a base enumeration object with predefined properties and
|
|
33
|
+
* symbols. This function is used to initialize an enumeration with
|
|
34
|
+
* specific characteristics, such as a name and various symbolic
|
|
35
|
+
* properties that enhance its functionality and identification.
|
|
36
|
+
*
|
|
37
|
+
* @param {string} name - The name of the enumeration. This name is
|
|
38
|
+
* used to identify the enumeration and is stored as a symbol on
|
|
39
|
+
* the object.
|
|
40
|
+
* @returns {Object} A new enumeration object with specific properties
|
|
41
|
+
* and symbols set for enhanced functionality and identification.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* // Create a base enum with the name 'Color'
|
|
45
|
+
* const colorEnum = makeBaseEnum('Color')
|
|
46
|
+
* console.log(colorEnum[Symbol.for('Enum.name')]) // Outputs: 'Color'
|
|
47
|
+
*/
|
|
48
|
+
export function makeBaseEnum(name: string): Object;
|
|
31
49
|
export const EnumExtension: Extension;
|
|
32
50
|
import { Extension } from '@nejs/extension';
|
package/dist/cjs/classes/enum.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EnumExtension = void 0;
|
|
4
4
|
exports.Enum = Enum;
|
|
5
|
+
exports.makeBaseEnum = makeBaseEnum;
|
|
5
6
|
const extension_1 = require("@nejs/extension");
|
|
6
7
|
const index_js_1 = require("../utils/index.js");
|
|
7
8
|
/**
|
|
@@ -15,58 +16,41 @@ const index_js_1 = require("../utils/index.js");
|
|
|
15
16
|
* @returns {Object} The constructed enumeration object.
|
|
16
17
|
*
|
|
17
18
|
* @example
|
|
18
|
-
* const colors = Enum('Colors', ['red', 'green', 'blue'])
|
|
19
|
-
* console.log(colors.red) // EnumValue object for 'red'
|
|
20
|
-
*
|
|
21
|
-
* @description
|
|
22
|
-
* The `Enum` function constructs an enumeration object with a given name,
|
|
23
|
-
* values, and optional properties. It supports primitive types, arrays,
|
|
24
|
-
* and objects as values. The function uses a combination of `Object.create`
|
|
25
|
-
* and `Proxy` to define and manage the properties of the enumeration.
|
|
26
|
-
*
|
|
27
|
-
* The enumeration object includes:
|
|
28
|
-
* - A `toString` method that returns the enumeration name.
|
|
29
|
-
* - A `Symbol.toStringTag` for identifying the object as an 'Enum'.
|
|
30
|
-
* - A `Symbol.for('Enum.name')` for storing the enumeration name.
|
|
31
|
-
*
|
|
32
|
-
* For array values, it creates a maker function that returns an
|
|
33
|
-
* `EnumValue` object with properties like `real`, `value`, `type`,
|
|
34
|
-
* `name`, and `compare`.
|
|
35
|
-
*/
|
|
19
|
+
* const colors = Enum('Colors', ['red', 'green', 'blue'])
|
|
20
|
+
* console.log(colors.red) // EnumValue object for 'red'
|
|
21
|
+
*
|
|
22
|
+
* @description
|
|
23
|
+
* The `Enum` function constructs an enumeration object with a given name,
|
|
24
|
+
* values, and optional properties. It supports primitive types, arrays,
|
|
25
|
+
* and objects as values. The function uses a combination of `Object.create`
|
|
26
|
+
* and `Proxy` to define and manage the properties of the enumeration.
|
|
27
|
+
*
|
|
28
|
+
* The enumeration object includes:
|
|
29
|
+
* - A `toString` method that returns the enumeration name.
|
|
30
|
+
* - A `Symbol.toStringTag` for identifying the object as an 'Enum'.
|
|
31
|
+
* - A `Symbol.for('Enum.name')` for storing the enumeration name.
|
|
32
|
+
*
|
|
33
|
+
* For array values, it creates a maker function that returns an
|
|
34
|
+
* `EnumValue` object with properties like `real`, `value`, `type`,
|
|
35
|
+
* `name`, and `compare`.
|
|
36
|
+
*/
|
|
36
37
|
function Enum(name, values, properties) {
|
|
37
|
-
const enumeration =
|
|
38
|
-
[Symbol.toStringTag]: (0, index_js_1.accessor)('Enum', false, true, false),
|
|
39
|
-
[Symbol.for('Enum.name')]: (0, index_js_1.accessor)(name, false, true, false),
|
|
40
|
-
[Symbol.for('Enum.valueKeys')]: (0, index_js_1.data)([], false, true, false),
|
|
41
|
-
[Symbol.for('nodejs.util.inspect.custom')]: (0, index_js_1.data)(function (depth, options, inspect) {
|
|
42
|
-
const valueKeys = this[Symbol.for('Enum.valueKeys')] ?? [];
|
|
43
|
-
let valueText = valueKeys
|
|
44
|
-
.map(key => `\x1b[1;2m${key}\x1b[22m`)
|
|
45
|
-
.join(', ');
|
|
46
|
-
if (valueText.length)
|
|
47
|
-
valueText = ` { ${valueText} }`;
|
|
48
|
-
return `\x1b[1menum \x1b[22m${name}${valueText}`;
|
|
49
|
-
}, false, true, false),
|
|
50
|
-
toString: (0, index_js_1.data)(function () {
|
|
51
|
-
return `Enum(${name})`;
|
|
52
|
-
}, false, true, false)
|
|
53
|
-
});
|
|
38
|
+
const enumeration = makeBaseEnum(name);
|
|
54
39
|
if (!Array.isArray(values)) {
|
|
55
40
|
values = [values];
|
|
56
41
|
}
|
|
57
|
-
const asString = o => index_js_1.as.string(o, { description: true, stringTag: true });
|
|
58
42
|
/**
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
43
|
+
* A new base `EnumValue` type object. It contains enough custom symbols and
|
|
44
|
+
* identifiers to allow things like a `compare(to)` function to also work on
|
|
45
|
+
* each of the elements. Thing of this as the shared base functionality for
|
|
46
|
+
* each `Enum` element.
|
|
47
|
+
*
|
|
48
|
+
* @param {any} enumValue the value around which an `EnumValue` type is
|
|
49
|
+
* created.
|
|
50
|
+
* @returns an object defined by {@link Symbol.toStringTag} as well as some
|
|
51
|
+
* custom {@link Symbol} keys. The `node.js` custom inspect symbol is also
|
|
52
|
+
* defined for better REPL representation.
|
|
53
|
+
*/
|
|
70
54
|
const makeEnumValue = (property, enumValue) => ({
|
|
71
55
|
toString: (0, index_js_1.data)(() => enumValue, false, true, false),
|
|
72
56
|
[Symbol.for('Enum.name')]: (0, index_js_1.data)(name, false, true, false),
|
|
@@ -118,14 +102,14 @@ function Enum(name, values, properties) {
|
|
|
118
102
|
}, false, true, false),
|
|
119
103
|
});
|
|
120
104
|
/**
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
105
|
+
* Given a value, determine how to represent it as both a key and a response
|
|
106
|
+
* or underlying original value. The method for this is dependent on the type
|
|
107
|
+
* of the value itself.
|
|
108
|
+
*
|
|
109
|
+
* @param {any} value the value to be converted
|
|
110
|
+
* @returns {[string, any]} an array where the first value is the transformed
|
|
111
|
+
* value as a key and the second element is the originally supplied value.
|
|
112
|
+
*/
|
|
129
113
|
const fromPrimitive = (value) => {
|
|
130
114
|
let valueType = typeof value;
|
|
131
115
|
switch (valueType) {
|
|
@@ -199,7 +183,6 @@ function Enum(name, values, properties) {
|
|
|
199
183
|
const valueType = Array.isArray(value) ? 'array' : typeof value;
|
|
200
184
|
let property = undefined;
|
|
201
185
|
let response = undefined;
|
|
202
|
-
let makeNew = undefined;
|
|
203
186
|
let wasArray = false;
|
|
204
187
|
let elements = value;
|
|
205
188
|
switch (valueType) {
|
|
@@ -277,4 +260,146 @@ function Enum(name, values, properties) {
|
|
|
277
260
|
return enumeration;
|
|
278
261
|
}
|
|
279
262
|
exports.EnumExtension = new extension_1.Extension(Enum);
|
|
263
|
+
/**
|
|
264
|
+
* Converts a given value to a string representation with additional
|
|
265
|
+
* options for description and string tag.
|
|
266
|
+
*
|
|
267
|
+
* @param {any} value - The value to be converted to a string. This can
|
|
268
|
+
* be of any type, including objects, arrays, numbers, etc.
|
|
269
|
+
* @returns {string} A string representation of the input value, enhanced
|
|
270
|
+
* with a description and string tag if applicable.
|
|
271
|
+
*
|
|
272
|
+
* @example
|
|
273
|
+
* // Convert a number to a string with additional options
|
|
274
|
+
* const result = asString(123)
|
|
275
|
+
* console.log(result) // Outputs: "123" with description and string tag
|
|
276
|
+
*
|
|
277
|
+
* @example
|
|
278
|
+
* // Convert an object to a string with additional options
|
|
279
|
+
* const obj = { key: 'value' }
|
|
280
|
+
* const result = asString(obj)
|
|
281
|
+
* console.log(result) // Outputs: "[object Object]" with description and
|
|
282
|
+
* // string tag
|
|
283
|
+
*/
|
|
284
|
+
function asString(value) {
|
|
285
|
+
return index_js_1.as.string(value, { description: true, stringTag: true });
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Creates a base enumeration object with predefined properties and
|
|
289
|
+
* symbols. This function is used to initialize an enumeration with
|
|
290
|
+
* specific characteristics, such as a name and various symbolic
|
|
291
|
+
* properties that enhance its functionality and identification.
|
|
292
|
+
*
|
|
293
|
+
* @param {string} name - The name of the enumeration. This name is
|
|
294
|
+
* used to identify the enumeration and is stored as a symbol on
|
|
295
|
+
* the object.
|
|
296
|
+
* @returns {Object} A new enumeration object with specific properties
|
|
297
|
+
* and symbols set for enhanced functionality and identification.
|
|
298
|
+
*
|
|
299
|
+
* @example
|
|
300
|
+
* // Create a base enum with the name 'Color'
|
|
301
|
+
* const colorEnum = makeBaseEnum('Color')
|
|
302
|
+
* console.log(colorEnum[Symbol.for('Enum.name')]) // Outputs: 'Color'
|
|
303
|
+
*/
|
|
304
|
+
function makeBaseEnum(name) {
|
|
305
|
+
return Object.create({}, {
|
|
306
|
+
/**
|
|
307
|
+
* Defines the `toStringTag` symbol on each enumeration to allow for
|
|
308
|
+
* type identification and to be consistent in naming conventions.
|
|
309
|
+
*
|
|
310
|
+
* @type {string}
|
|
311
|
+
*/
|
|
312
|
+
[Symbol.toStringTag]: (0, index_js_1.accessor)('Enum', false, true, false),
|
|
313
|
+
/**
|
|
314
|
+
* In addition to the `toStringTag` symbol which defines this enumeration
|
|
315
|
+
* as an Enum type, the name of the enum is also codified in as a symbol
|
|
316
|
+
* on the object. It can be found using `Symbol.for('Enum.name')`.
|
|
317
|
+
*
|
|
318
|
+
* @type {string|symbol|number}
|
|
319
|
+
*/
|
|
320
|
+
[Symbol.for('Enum.name')]: (0, index_js_1.accessor)(name, false, true, false),
|
|
321
|
+
/**
|
|
322
|
+
* Knowing which keys of the enum are part of the keys themselves is also
|
|
323
|
+
* crucial for enumerations. These can always be found on each Enum type
|
|
324
|
+
* as `Symbol.for('Enum.valueKeys')` as an array, but can also be found
|
|
325
|
+
* as the `.keys` property if there is no enum value of that name.
|
|
326
|
+
*/
|
|
327
|
+
[Symbol.for('Enum.valueKeys')]: (0, index_js_1.data)([], false, true, false),
|
|
328
|
+
/**
|
|
329
|
+
* For users of the node.js REPL, this symbol represents enum types in a
|
|
330
|
+
* more readily readable format. See the docs for node's `util.inspect()`
|
|
331
|
+
* function for more details.
|
|
332
|
+
*
|
|
333
|
+
* @type {(number, object, Function) => string}
|
|
334
|
+
*/
|
|
335
|
+
[Symbol.for('nodejs.util.inspect.custom')]: (0, index_js_1.data)(function (depth, options, inspect) {
|
|
336
|
+
const valueKeys = this[Symbol.for('Enum.valueKeys')] ?? [];
|
|
337
|
+
let valueText = valueKeys
|
|
338
|
+
.map(key => `\x1b[1;2m${key}\x1b[22m`)
|
|
339
|
+
.join(', ');
|
|
340
|
+
if (valueText.length)
|
|
341
|
+
valueText = ` { ${valueText} }`;
|
|
342
|
+
return `\x1b[1menum \x1b[22m${name}${valueText}`;
|
|
343
|
+
}, false, true, false),
|
|
344
|
+
/**
|
|
345
|
+
* This function checks the supplied `possibleEnumValue` to see if it
|
|
346
|
+
* is an enum value type from this enum.
|
|
347
|
+
*
|
|
348
|
+
* @param {any} possibleEnumValue the value to evaluate
|
|
349
|
+
* @returns {boolean} returns `true` if the value is an enum value type
|
|
350
|
+
* from this `Enum`, irrespective of any associated value. Returns `false`
|
|
351
|
+
* otherwise.
|
|
352
|
+
*/
|
|
353
|
+
isValueOf: (0, index_js_1.data)(function isValueOf(possibleEnumValue) {
|
|
354
|
+
if (!possibleEnumValue || typeof possibleEnumValue !== 'object')
|
|
355
|
+
return false;
|
|
356
|
+
const enumValueType = possibleEnumValue?.type;
|
|
357
|
+
const enumValueName = possibleEnumValue?.name;
|
|
358
|
+
const thisEnumName = this[Symbol.for('Enum.name')];
|
|
359
|
+
const thisEnumKeys = this[Symbol.for('Enum.valueKeys')];
|
|
360
|
+
return (enumValueType === thisEnumName &&
|
|
361
|
+
thisEnumKeys.includes(enumValueName));
|
|
362
|
+
}, false, true, false),
|
|
363
|
+
/**
|
|
364
|
+
* A simple overload of the `toString()` method to represent the enum
|
|
365
|
+
* more identifiably when called. The result will be the word enum with
|
|
366
|
+
* the name of the enum in parenthesis. So a Gender enum might be seen
|
|
367
|
+
* as `Enum(Gender)` as a result to calling this function.
|
|
368
|
+
*
|
|
369
|
+
* @returns {string} a {@link String} representation of this object.
|
|
370
|
+
*/
|
|
371
|
+
toString: (0, index_js_1.data)(function toString() {
|
|
372
|
+
return `Enum(${name})`;
|
|
373
|
+
}, false, true, false)
|
|
374
|
+
});
|
|
375
|
+
const applySyntacticSugar = () => {
|
|
376
|
+
createSymlinks(Symbol.for('Enum.valueKeys'), 'keys');
|
|
377
|
+
createSymlinks(Symbol.for('Enum.name'), 'name');
|
|
378
|
+
};
|
|
379
|
+
return [base, applySyntacticSugar];
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Creates a symlink for a property from an existing key to a new key on
|
|
383
|
+
* the specified object. This function checks if the new key already
|
|
384
|
+
* exists on the object and, if not, it creates a new property with the
|
|
385
|
+
* same descriptor as the old key.
|
|
386
|
+
*
|
|
387
|
+
* Since this method creates the new link through the use of property
|
|
388
|
+
* descriptors, computed getters and setters also are mapped properly.
|
|
389
|
+
*
|
|
390
|
+
* @param {Object} on - The target object on which the symlink is to be
|
|
391
|
+
* created.
|
|
392
|
+
* @param {string|symbol} oldKey - The existing key whose property
|
|
393
|
+
* descriptor will be used for the new key.
|
|
394
|
+
* @param {string|symbol} newKey - The new key under which the property
|
|
395
|
+
* will be accessible.
|
|
396
|
+
*
|
|
397
|
+
* @example
|
|
398
|
+
* const obj = { a: 1 }
|
|
399
|
+
* createSymlink(obj, 'a', 'b')
|
|
400
|
+
* console.log(obj.b) // Outputs: 1
|
|
401
|
+
*/
|
|
402
|
+
function createSymlinks(on, oldKey, ...newKeys) {
|
|
403
|
+
(0, index_js_1.redescribe)(on, oldKey, {}, { alsoAs: newKeys });
|
|
404
|
+
}
|
|
280
405
|
//# sourceMappingURL=enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../src/classes/enum.js"],"names":[],"mappings":";;;AAgCA,oBAqTC;AArVD,+CAA2C;AAC3C,gDAAoE;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BE;AACF,SAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU;IAC5C,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE;QACpC,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,IAAA,mBAAQ,EAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC;QAC1D,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,EAAE,IAAA,mBAAQ,EAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC;QAC7D,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,EAAE,IAAA,eAAI,EAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC;QAC5D,CAAC,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC,EAAE,IAAA,eAAI,EAC9C,UAAS,KAAK,EAAE,OAAO,EAAE,OAAO;YAC9B,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,IAAI,EAAE,CAAA;YAC1D,IAAI,SAAS,GAAG,SAAS;iBACtB,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,YAAY,GAAG,UAAU,CAAC;iBACrC,IAAI,CAAC,IAAI,CAAC,CAAA;YAEb,IAAI,SAAS,CAAC,MAAM;gBAClB,SAAS,GAAG,MAAM,SAAS,IAAI,CAAA;YAEjC,OAAO,uBAAuB,I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