estreui 1.2.3 → 1.2.4
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/index.html +8 -1
- package/package.json +4 -4
- package/scripts/alienese.js +282 -275
- package/scripts/boot.js +107 -67
- package/scripts/doctre.js +330 -6
- package/scripts/estreU0EEOZ.js +25 -4
- package/scripts/estreUi-core.js +555 -0
- package/scripts/estreUi-dialog.js +511 -0
- package/scripts/estreUi-handles.js +7243 -0
- package/scripts/estreUi-interaction.js +1374 -0
- package/scripts/estreUi-main.js +1667 -0
- package/scripts/estreUi-notation.js +596 -0
- package/scripts/estreUi-pageManager.js +625 -0
- package/scripts/estreUi-pageModel.js +4317 -0
- package/scripts/modernism.js +44 -3
- package/serviceWorker.js +10 -3
- package/scripts/estreUi.js +0 -16337
package/scripts/alienese.js
CHANGED
|
@@ -32,7 +32,7 @@ SOFTWARE.
|
|
|
32
32
|
// This patch aims to create smaller (quicker) and more concise (lighter) JavaScript code.
|
|
33
33
|
// It makes the code more implicit and serves as an alternative to obfuscation.
|
|
34
34
|
//
|
|
35
|
-
// v0.7.
|
|
35
|
+
// v0.7.2 / release 2026.04.18
|
|
36
36
|
//
|
|
37
37
|
// * Must be loaded modernism.js before this script.
|
|
38
38
|
//
|
|
@@ -55,7 +55,7 @@ const dfg = defineGlobal ?? ((name, value) => Object.defineProperty(_gb, name, {
|
|
|
55
55
|
}));
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
// common letter constants
|
|
58
|
+
// common letter constants — single character constants `_0`~`_9`, `_a`~`_z`, `_A`~`_Z`
|
|
59
59
|
const _0 = "0";
|
|
60
60
|
const _1 = "1";
|
|
61
61
|
const _2 = "2";
|
|
@@ -122,145 +122,146 @@ const _Y = "Y";
|
|
|
122
122
|
const _Z = "Z";
|
|
123
123
|
|
|
124
124
|
|
|
125
|
-
// common extra characters constants
|
|
126
|
-
const lr = "(";
|
|
127
|
-
const rr = ")";
|
|
128
|
-
const lc = "{";
|
|
129
|
-
const rc = "}";
|
|
130
|
-
const ls = "[";
|
|
131
|
-
const rs = "]";
|
|
132
|
-
const lt = "<";
|
|
133
|
-
const gt = ">";
|
|
134
|
-
const ab = lt + gt;
|
|
135
|
-
const cb = gt + lt;
|
|
136
|
-
const ti = "~";
|
|
137
|
-
const ep = "!";
|
|
138
|
-
const em = ep;
|
|
139
|
-
const at = "@";
|
|
140
|
-
const ds = "$";
|
|
141
|
-
const ms = "&";
|
|
142
|
-
const ps = "%";
|
|
143
|
-
const cf = "^";
|
|
144
|
-
const ak = "*";
|
|
145
|
-
const mp = ak;
|
|
146
|
-
const ad = "+";
|
|
147
|
-
const add = ad + ad;
|
|
148
|
-
const hp = "-";
|
|
149
|
-
const sr = hp;
|
|
150
|
-
const srr = sr + sr;
|
|
151
|
-
const us = "_";
|
|
152
|
-
const eq = "=";
|
|
153
|
-
const vl = "|";
|
|
154
|
-
const bs = "\\";
|
|
155
|
-
const ss = "/";
|
|
156
|
-
const dv = ss;
|
|
157
|
-
const qm = "?";
|
|
158
|
-
const nl = ep + eq;
|
|
159
|
-
const le = lt + eq;
|
|
160
|
-
const ge = gt + eq;
|
|
161
|
-
const fa = ad + eq;
|
|
162
|
-
const fs = sr + eq;
|
|
163
|
-
const fm = mp + eq;
|
|
164
|
-
const fd = dv + eq;
|
|
165
|
-
const sq = "'";
|
|
166
|
-
const dq = '"';
|
|
167
|
-
const gv = '`';
|
|
168
|
-
const cl = ":";
|
|
169
|
-
const sc = ";";
|
|
170
|
-
const cm = ",";
|
|
171
|
-
const es = "";
|
|
172
|
-
const l = cm;
|
|
173
|
-
const s = " ";
|
|
174
|
-
const i = "#";
|
|
175
|
-
const d = ".";
|
|
176
|
-
|
|
177
|
-
const cr = "\r";
|
|
178
|
-
const lf = "\n";
|
|
179
|
-
const crlf = cr + lf;
|
|
180
|
-
const lfcr = lf + cr;
|
|
181
|
-
const tab = "\t";
|
|
182
|
-
|
|
183
|
-
const ecr = "\\r";
|
|
184
|
-
const elf = "\\n";
|
|
185
|
-
const ecrlf = ecr + elf;
|
|
186
|
-
const elfcr = elf + ecr;
|
|
187
|
-
const etab = "\\t";
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
// primitive types alias constant
|
|
191
|
-
const U = UNDEFINED;
|
|
192
|
-
const N = NULL;
|
|
193
|
-
const T = TRUE;
|
|
194
|
-
const F = FALSE;
|
|
195
|
-
|
|
196
|
-
const u = undefined;
|
|
197
|
-
const n = null;
|
|
198
|
-
const t = true;
|
|
199
|
-
const f = false;
|
|
200
|
-
|
|
201
|
-
// end point assigner constant
|
|
202
|
-
const eoo = u;
|
|
203
|
-
const eoa = u;
|
|
125
|
+
// common extra characters constants — symbol string aliases
|
|
126
|
+
/** @const {string} lr - left parenthesis `"("`. */ const lr = "(";
|
|
127
|
+
/** @const {string} rr - right parenthesis `")"`. */ const rr = ")";
|
|
128
|
+
/** @const {string} lc - left curly brace `"{"`. */ const lc = "{";
|
|
129
|
+
/** @const {string} rc - right curly brace `"}"`. */ const rc = "}";
|
|
130
|
+
/** @const {string} ls - left bracket `"["`. */ const ls = "[";
|
|
131
|
+
/** @const {string} rs - right bracket `"]"`. */ const rs = "]";
|
|
132
|
+
/** @const {string} lt - less than `"<"`. */ const lt = "<";
|
|
133
|
+
/** @const {string} gt - greater than `">"`. */ const gt = ">";
|
|
134
|
+
/** @const {string} ab - angle bracket open-close `"<>"`. */ const ab = lt + gt;
|
|
135
|
+
/** @const {string} cb - angle bracket close-open `"><"`. */ const cb = gt + lt;
|
|
136
|
+
/** @const {string} ti - tilde `"~"`. */ const ti = "~";
|
|
137
|
+
/** @const {string} ep - exclamation mark `"!"`. */ const ep = "!";
|
|
138
|
+
/** @const {string} em - exclamation alias (= ep). */ const em = ep;
|
|
139
|
+
/** @const {string} at - at sign `"@"`. */ const at = "@";
|
|
140
|
+
/** @const {string} ds - dollar sign `"$"`. */ const ds = "$";
|
|
141
|
+
/** @const {string} ms - ampersand `"&"`. */ const ms = "&";
|
|
142
|
+
/** @const {string} ps - percent `"%"`. */ const ps = "%";
|
|
143
|
+
/** @const {string} cf - caret `"^"`. */ const cf = "^";
|
|
144
|
+
/** @const {string} ak - asterisk `"*"`. */ const ak = "*";
|
|
145
|
+
/** @const {string} mp - multiply asterisk (= ak). */ const mp = ak;
|
|
146
|
+
/** @const {string} ad - plus `"+"`. */ const ad = "+";
|
|
147
|
+
/** @const {string} add - increment `"++"`. */ const add = ad + ad;
|
|
148
|
+
/** @const {string} hp - minus/hyphen `"-"`. */ const hp = "-";
|
|
149
|
+
/** @const {string} sr - minus alias (= hp). */ const sr = hp;
|
|
150
|
+
/** @const {string} srr - decrement `"--"`. */ const srr = sr + sr;
|
|
151
|
+
/** @const {string} us - underscore `"_"`. */ const us = "_";
|
|
152
|
+
/** @const {string} eq - equals sign `"="`. */ const eq = "=";
|
|
153
|
+
/** @const {string} vl - pipe `"|"`. */ const vl = "|";
|
|
154
|
+
/** @const {string} bs - backslash `"\\"`. */ const bs = "\\";
|
|
155
|
+
/** @const {string} ss - slash `"/"`. */ const ss = "/";
|
|
156
|
+
/** @const {string} dv - division slash (= ss). */ const dv = ss;
|
|
157
|
+
/** @const {string} qm - question mark `"?"`. */ const qm = "?";
|
|
158
|
+
/** @const {string} nl - not-equal sign `"!="`. */ const nl = ep + eq;
|
|
159
|
+
/** @const {string} le - less than or equal `"<="`. */ const le = lt + eq;
|
|
160
|
+
/** @const {string} ge - greater than or equal `">="`. */ const ge = gt + eq;
|
|
161
|
+
/** @const {string} fa - addition assignment `"+="`. */ const fa = ad + eq;
|
|
162
|
+
/** @const {string} fs - subtraction assignment `"-="`. */ const fs = sr + eq;
|
|
163
|
+
/** @const {string} fm - multiplication assignment `"*="`. */ const fm = mp + eq;
|
|
164
|
+
/** @const {string} fd - division assignment `"/="`. */ const fd = dv + eq;
|
|
165
|
+
/** @const {string} sq - single quote `"'"`. */ const sq = "'";
|
|
166
|
+
/** @const {string} dq - double quote `'"'`. */ const dq = '"';
|
|
167
|
+
/** @const {string} gv - backtick `` "`" ``. */ const gv = '`';
|
|
168
|
+
/** @const {string} cl - colon `":"`. */ const cl = ":";
|
|
169
|
+
/** @const {string} sc - semicolon `";"`. */ const sc = ";";
|
|
170
|
+
/** @const {string} cm - comma `","`. */ const cm = ",";
|
|
171
|
+
/** @const {string} es - empty string `""`. */ const es = "";
|
|
172
|
+
/** @const {string} l - comma (= cm). List separator. */ const l = cm;
|
|
173
|
+
/** @const {string} s - space `" "`. */ const s = " ";
|
|
174
|
+
/** @const {string} i - hash `"#"`. CSS ID selector prefix. */ const i = "#";
|
|
175
|
+
/** @const {string} d - dot `"."`. CSS class selector prefix and separator. */ const d = ".";
|
|
176
|
+
|
|
177
|
+
/** @const {string} cr - carriage return. */ const cr = "\r";
|
|
178
|
+
/** @const {string} lf - line feed. */ const lf = "\n";
|
|
179
|
+
/** @const {string} crlf - CR+LF line ending. */ const crlf = cr + lf;
|
|
180
|
+
/** @const {string} lfcr - LF+CR line ending. */ const lfcr = lf + cr;
|
|
181
|
+
/** @const {string} tab - tab character. */ const tab = "\t";
|
|
182
|
+
|
|
183
|
+
/** @const {string} ecr - escaped CR literal string. */ const ecr = "\\r";
|
|
184
|
+
/** @const {string} elf - escaped LF literal string. */ const elf = "\\n";
|
|
185
|
+
/** @const {string} ecrlf - escaped CRLF literal string. */ const ecrlf = ecr + elf;
|
|
186
|
+
/** @const {string} elfcr - escaped LFCR literal string. */ const elfcr = elf + ecr;
|
|
187
|
+
/** @const {string} etab - escaped tab literal string. */ const etab = "\\t";
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
// primitive types alias constant — primitive type aliases
|
|
191
|
+
/** @const {string} U - `"undefined"` string constant. For typeof comparison. */ const U = UNDEFINED;
|
|
192
|
+
/** @const {string} N - `"null"` string constant. */ const N = NULL;
|
|
193
|
+
/** @const {string} T - `"true"` string constant. */ const T = TRUE;
|
|
194
|
+
/** @const {string} F - `"false"` string constant. */ const F = FALSE;
|
|
195
|
+
|
|
196
|
+
/** @const {undefined} u - `undefined` alias. */ const u = undefined;
|
|
197
|
+
/** @const {null} n - `null` alias. */ const n = null;
|
|
198
|
+
/** @const {boolean} t - `true` alias. */ const t = true;
|
|
199
|
+
/** @const {boolean} f - `false` alias. */ const f = false;
|
|
200
|
+
|
|
201
|
+
// end point assigner constant — array/object end marker (= undefined)
|
|
202
|
+
/** @const {undefined} eoo - End Of Object. undefined as object end marker. */ const eoo = u;
|
|
203
|
+
/** @const {undefined} eoa - End Of Array. undefined as array end marker. */ const eoa = u;
|
|
204
204
|
|
|
205
205
|
// prototype of primitive types alias constant
|
|
206
|
-
const FNC = FUNCTION;
|
|
207
|
-
const BLE = BOOLEAN;
|
|
208
|
-
const STR = STRING;
|
|
209
|
-
const SYM = SYMBOL;
|
|
210
|
-
const NUM = NUMBER;
|
|
211
|
-
const BIG = BIGINT;
|
|
212
|
-
const OBJ = OBJECT;
|
|
213
|
-
|
|
214
|
-
const fun = Function;
|
|
215
|
-
const ble = Boolean;
|
|
216
|
-
const str = String;
|
|
217
|
-
const sym = Symbol;
|
|
218
|
-
const num = Number;
|
|
219
|
-
const big = BigInt;
|
|
220
|
-
const obj = Object;
|
|
206
|
+
/** @const {string} FNC - `"function"` type string. */ const FNC = FUNCTION;
|
|
207
|
+
/** @const {string} BLE - `"boolean"` type string. */ const BLE = BOOLEAN;
|
|
208
|
+
/** @const {string} STR - `"string"` type string. */ const STR = STRING;
|
|
209
|
+
/** @const {string} SYM - `"symbol"` type string. */ const SYM = SYMBOL;
|
|
210
|
+
/** @const {string} NUM - `"number"` type string. */ const NUM = NUMBER;
|
|
211
|
+
/** @const {string} BIG - `"bigint"` type string. */ const BIG = BIGINT;
|
|
212
|
+
/** @const {string} OBJ - `"object"` type string. */ const OBJ = OBJECT;
|
|
213
|
+
|
|
214
|
+
/** @const {FunctionConstructor} fun - `Function` alias. */ const fun = Function;
|
|
215
|
+
/** @const {BooleanConstructor} ble - `Boolean` alias. */ const ble = Boolean;
|
|
216
|
+
/** @const {StringConstructor} str - `String` alias. */ const str = String;
|
|
217
|
+
/** @const {Function} sym - `Symbol` alias. */ const sym = Symbol;
|
|
218
|
+
/** @const {NumberConstructor} num - `Number` alias. */ const num = Number;
|
|
219
|
+
/** @const {Function} big - `BigInt` alias. */ const big = BigInt;
|
|
220
|
+
/** @const {ObjectConstructor} obj - `Object` alias. */ const obj = Object;
|
|
221
221
|
|
|
222
222
|
// class names of primitive types constant
|
|
223
|
-
const FN = _FUNCTION;
|
|
224
|
-
const BL = _BOOLEAN;
|
|
225
|
-
const ST = _STRING;
|
|
226
|
-
const SY = _SYMBOL;
|
|
227
|
-
const NO = _NUMBER;
|
|
228
|
-
const BI = _BIG_INT;
|
|
229
|
-
const OJ = _OBJECT;
|
|
230
|
-
|
|
231
|
-
const fn = Function;
|
|
232
|
-
const bl = Boolean;
|
|
233
|
-
const sg = String;
|
|
234
|
-
const sl = Symbol;
|
|
235
|
-
const no = Number;
|
|
236
|
-
const bi = BigInt;
|
|
237
|
-
const oj = Object;
|
|
223
|
+
/** @const {string} FN - `"Function"` class name. */ const FN = _FUNCTION;
|
|
224
|
+
/** @const {string} BL - `"Boolean"` class name. */ const BL = _BOOLEAN;
|
|
225
|
+
/** @const {string} ST - `"String"` class name. */ const ST = _STRING;
|
|
226
|
+
/** @const {string} SY - `"Symbol"` class name. */ const SY = _SYMBOL;
|
|
227
|
+
/** @const {string} NO - `"Number"` class name. */ const NO = _NUMBER;
|
|
228
|
+
/** @const {string} BI - `"BigInt"` class name. */ const BI = _BIG_INT;
|
|
229
|
+
/** @const {string} OJ - `"Object"` class name. */ const OJ = _OBJECT;
|
|
230
|
+
|
|
231
|
+
/** @const {FunctionConstructor} fn - `Function` class ref (= fun). */ const fn = Function;
|
|
232
|
+
/** @const {BooleanConstructor} bl - `Boolean` class ref (= ble). */ const bl = Boolean;
|
|
233
|
+
/** @const {StringConstructor} sg - `String` class ref. */ const sg = String;
|
|
234
|
+
/** @const {Function} sl - `Symbol` class ref. */ const sl = Symbol;
|
|
235
|
+
/** @const {NumberConstructor} no - `Number` class ref. */ const no = Number;
|
|
236
|
+
/** @const {Function} bi - `BigInt` class ref. */ const bi = BigInt;
|
|
237
|
+
/** @const {ObjectConstructor} oj - `Object` class ref (= obj). */ const oj = Object;
|
|
238
238
|
|
|
239
239
|
|
|
240
240
|
// frequent object types alias constant
|
|
241
|
-
const DT = _DATE;
|
|
242
|
-
const TT = _TIME;
|
|
241
|
+
/** @const {string} DT - `"Date"` class name. */ const DT = _DATE;
|
|
242
|
+
/** @const {string} TT - `"Time"` class name. */ const TT = _TIME;
|
|
243
243
|
|
|
244
|
-
const RA = _ARRAY;
|
|
245
|
-
const SA = _SET;
|
|
246
|
-
const MA = _MAP;
|
|
244
|
+
/** @const {string} RA - `"Array"` class name. */ const RA = _ARRAY;
|
|
245
|
+
/** @const {string} SA - `"Set"` class name. */ const SA = _SET;
|
|
246
|
+
/** @const {string} MA - `"Map"` class name. */ const MA = _MAP;
|
|
247
247
|
|
|
248
|
-
const dt = Date;
|
|
249
|
-
const tt = Time;
|
|
248
|
+
/** @const {DateConstructor} dt - `Date` constructor alias. */ const dt = Date;
|
|
249
|
+
/** @const {Function} tt - `Time` constructor alias. */ const tt = Time;
|
|
250
250
|
|
|
251
|
-
const ra = Array;
|
|
252
|
-
const sa = Set;
|
|
253
|
-
const ma = Map;
|
|
251
|
+
/** @const {ArrayConstructor} ra - `Array` constructor alias. */ const ra = Array;
|
|
252
|
+
/** @const {SetConstructor} sa - `Set` constructor alias. */ const sa = Set;
|
|
253
|
+
/** @const {MapConstructor} ma - `Map` constructor alias. */ const ma = Map;
|
|
254
254
|
|
|
255
255
|
|
|
256
256
|
// frequent assign types alias constant
|
|
257
|
-
const fnd = FORE_NOT_DEFAULT;
|
|
258
|
-
const mnd = MORE_NOT_DEFAULT;
|
|
259
|
-
const def = DEFAULT;
|
|
260
|
-
const fin = FINALLY;
|
|
257
|
+
/** @const {string} fnd - `FORE_NOT_DEFAULT` assign priority. */ const fnd = FORE_NOT_DEFAULT;
|
|
258
|
+
/** @const {string} mnd - `MORE_NOT_DEFAULT` assign priority. */ const mnd = MORE_NOT_DEFAULT;
|
|
259
|
+
/** @const {string} def - `DEFAULT` assign priority. */ const def = DEFAULT;
|
|
260
|
+
/** @const {string} fin - `FINALLY` assign priority. */ const fin = FINALLY;
|
|
261
261
|
|
|
262
262
|
|
|
263
263
|
// frequent object types empty object issuer alias constant
|
|
264
|
+
/** @const {Object} x - Empty instance issuer. `x.a` → Array, `x.d` → Date, `x.m` → Time, `x.t` → Set, `x.p` → Map. */
|
|
264
265
|
const x = {
|
|
265
266
|
get a() { return new Array(); },
|
|
266
267
|
get d() { return new Date(); },
|
|
@@ -271,187 +272,193 @@ const x = {
|
|
|
271
272
|
|
|
272
273
|
|
|
273
274
|
// bypass constant
|
|
274
|
-
const ifx = executeIf;
|
|
275
|
-
const itx = executeWhen;
|
|
275
|
+
/** @const {Function} ifx - `executeIf()` — conditional execution. */ const ifx = executeIf;
|
|
276
|
+
/** @const {Function} itx - `executeWhen()` — conditional execution variant. */ const itx = executeWhen;
|
|
276
277
|
|
|
277
|
-
const ifr = ifReturn;
|
|
278
|
+
/** @const {Function} ifr - `ifReturn()` — conditional return. */ const ifr = ifReturn;
|
|
278
279
|
|
|
279
|
-
const roen = ifReturnOrEmptyNumber;
|
|
280
|
-
const roes = ifReturnOrEmptyString;
|
|
281
|
-
const roea = ifReturnOrEmptyArray;
|
|
282
|
-
const roeo = ifReturnOrEmptyObject;
|
|
280
|
+
/** @const {Function} roen - `ifReturnOrEmptyNumber()` — returns value or 0. */ const roen = ifReturnOrEmptyNumber;
|
|
281
|
+
/** @const {Function} roes - `ifReturnOrEmptyString()` — returns value or "". */ const roes = ifReturnOrEmptyString;
|
|
282
|
+
/** @const {Function} roea - `ifReturnOrEmptyArray()` — returns value or []. */ const roea = ifReturnOrEmptyArray;
|
|
283
|
+
/** @const {Function} roeo - `ifReturnOrEmptyObject()` — returns value or {}. */ const roeo = ifReturnOrEmptyObject;
|
|
283
284
|
|
|
284
|
-
const val = valet;
|
|
285
|
+
/** @const {Function} val - `valet()` — value extraction helper. */ const val = valet;
|
|
285
286
|
|
|
286
287
|
|
|
287
288
|
// common process shortcut constant
|
|
288
|
-
const f02b = forZeroToBefore;
|
|
289
|
-
const f02r = forZeroToReach;
|
|
290
|
-
|
|
291
|
-
const f20 = forToZeroFrom;
|
|
292
|
-
const f21 = forToPrimeFrom;
|
|
293
|
-
|
|
294
|
-
const ff = forForward;
|
|
295
|
-
const fb = forBackward;
|
|
296
|
-
|
|
297
|
-
const fi = forin;
|
|
298
|
-
const fiv = forinner;
|
|
299
|
-
|
|
300
|
-
const fo = forof;
|
|
301
|
-
const fkv = forkv;
|
|
302
|
-
|
|
303
|
-
const w = whileIn;
|
|
304
|
-
const dw = doWhileIn;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
// meaning comparator constant
|
|
308
|
-
const to = typeOf;
|
|
309
|
-
|
|
310
|
-
const tm = typeMatch;
|
|
311
|
-
|
|
312
|
-
const tu = typeUndefined;
|
|
313
|
-
const tf = typeFunction;
|
|
314
|
-
const tb = typeBoolean;
|
|
315
|
-
const ts = typeString;
|
|
316
|
-
const ty = typeSymbol;
|
|
317
|
-
const tn = typeNumber;
|
|
318
|
-
const tg = typeBigint;
|
|
319
|
-
const tj = typeObject;
|
|
320
|
-
|
|
321
|
-
const im = instanceMatch;
|
|
322
|
-
const io = isObject;
|
|
323
|
-
const ia = isArray;
|
|
324
|
-
const ioa = isArray;
|
|
325
|
-
const ios = isString;
|
|
326
|
-
const ion = isNumber;
|
|
327
|
-
const iot = isSet;
|
|
328
|
-
const iop = isMap;
|
|
329
|
-
|
|
330
|
-
const sm = same;
|
|
331
|
-
const df = differ;
|
|
332
|
-
|
|
333
|
-
const xv = exact;
|
|
334
|
-
const nxv = notExact;
|
|
335
|
-
const xnv = exactlyNot;
|
|
336
|
-
const xm = exactMatches;
|
|
337
|
-
const nx = notExactMatches;
|
|
338
|
-
const xnm = exactlyNotMatches;
|
|
339
|
-
|
|
340
|
-
const ev = equals;
|
|
341
|
-
const nev = notEquals;
|
|
342
|
-
|
|
343
|
-
const gtv = gatherThan;
|
|
344
|
-
const ltv = lessThan;
|
|
345
|
-
const ngt = notGatherThan;
|
|
346
|
-
const nlt = notLessThan;
|
|
347
|
-
|
|
348
|
-
const gev = gatherOrEquals;
|
|
349
|
-
const lev = lessOrEquals;
|
|
350
|
-
const nge = notGatherAndEquals;
|
|
351
|
-
const nle = notLessAndEquals;
|
|
352
|
-
|
|
353
|
-
const fc = isFalseCase;
|
|
354
|
-
const nfc = isNotFalseCase;
|
|
355
|
-
|
|
356
|
-
const xu = isUndefined;
|
|
357
|
-
const xn = isNull;
|
|
358
|
-
const xt = isExactTrue;
|
|
359
|
-
const xf = isExactFalse;
|
|
360
|
-
|
|
361
|
-
const nxu = isNotUndefined;
|
|
362
|
-
const nxn = isNotNull;
|
|
363
|
-
const nxt = isNotTrue;
|
|
364
|
-
const nxf = isNotFalse;
|
|
365
|
-
|
|
366
|
-
const en = isNully;
|
|
367
|
-
const et = isTruely;
|
|
368
|
-
const ef = isFalsely;
|
|
369
|
-
const ee = isEmpty;
|
|
370
|
-
|
|
371
|
-
const nn = isNotNully;
|
|
372
|
-
const nt = isNotTruely;
|
|
373
|
-
const nf = isNotFalsely;
|
|
374
|
-
const ne = isNotEmpty;
|
|
375
|
-
|
|
376
|
-
const noe = isNullOrEmpty;
|
|
289
|
+
/** @const {Function} f02b - `forZeroToBefore()` — loop 0 to n-1. */ const f02b = forZeroToBefore;
|
|
290
|
+
/** @const {Function} f02r - `forZeroToReach()` — loop 0 to n (inclusive). */ const f02r = forZeroToReach;
|
|
291
|
+
|
|
292
|
+
/** @const {Function} f20 - `forToZeroFrom()` — reverse loop to 0. */ const f20 = forToZeroFrom;
|
|
293
|
+
/** @const {Function} f21 - `forToPrimeFrom()` — reverse loop to 1. */ const f21 = forToPrimeFrom;
|
|
294
|
+
|
|
295
|
+
/** @const {Function} ff - `forForward()` — forward iteration. */ const ff = forForward;
|
|
296
|
+
/** @const {Function} fb - `forBackward()` — backward iteration. */ const fb = forBackward;
|
|
297
|
+
|
|
298
|
+
/** @const {Function} fi - `forin()` — for-in loop. */ const fi = forin;
|
|
299
|
+
/** @const {Function} fiv - `forinner()` — nested for-in loop. */ const fiv = forinner;
|
|
300
|
+
|
|
301
|
+
/** @const {Function} fo - `forof()` — for-of loop. */ const fo = forof;
|
|
302
|
+
/** @const {Function} fkv - `forkv()` — key-value iteration. */ const fkv = forkv;
|
|
303
|
+
|
|
304
|
+
/** @const {Function} w - `whileIn()` — while loop. */ const w = whileIn;
|
|
305
|
+
/** @const {Function} dw - `doWhileIn()` — do-while loop. */ const dw = doWhileIn;
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
// meaning comparator constant — type/value comparison function aliases
|
|
309
|
+
/** @const {Function} to - `typeOf()` alias. */ const to = typeOf;
|
|
310
|
+
|
|
311
|
+
/** @const {Function} tm - `typeMatch()` — typeof comparison. */ const tm = typeMatch;
|
|
312
|
+
|
|
313
|
+
/** @const {Function} tu - `typeUndefined()` — typeof === "undefined". */ const tu = typeUndefined;
|
|
314
|
+
/** @const {Function} tf - `typeFunction()` — typeof === "function". */ const tf = typeFunction;
|
|
315
|
+
/** @const {Function} tb - `typeBoolean()` — typeof === "boolean". */ const tb = typeBoolean;
|
|
316
|
+
/** @const {Function} ts - `typeString()` — typeof === "string". */ const ts = typeString;
|
|
317
|
+
/** @const {Function} ty - `typeSymbol()` — typeof === "symbol". */ const ty = typeSymbol;
|
|
318
|
+
/** @const {Function} tn - `typeNumber()` — typeof === "number". */ const tn = typeNumber;
|
|
319
|
+
/** @const {Function} tg - `typeBigint()` — typeof === "bigint". */ const tg = typeBigint;
|
|
320
|
+
/** @const {Function} tj - `typeObject()` — typeof === "object". */ const tj = typeObject;
|
|
321
|
+
|
|
322
|
+
/** @const {Function} im - `instanceMatch()` — instanceof check. */ const im = instanceMatch;
|
|
323
|
+
/** @const {Function} io - `isObject()` — is plain object. */ const io = isObject;
|
|
324
|
+
/** @const {Function} ia - `isArray()` — Array.isArray(). */ const ia = isArray;
|
|
325
|
+
/** @const {Function} ioa - `isArray()` alias (= ia). */ const ioa = isArray;
|
|
326
|
+
/** @const {Function} ios - `isString()` — is string type. */ const ios = isString;
|
|
327
|
+
/** @const {Function} ion - `isNumber()` — is number type. */ const ion = isNumber;
|
|
328
|
+
/** @const {Function} iot - `isSet()` — is Set instance. */ const iot = isSet;
|
|
329
|
+
/** @const {Function} iop - `isMap()` — is Map instance. */ const iop = isMap;
|
|
330
|
+
|
|
331
|
+
/** @const {Function} sm - `same()` — loose equality (==). */ const sm = same;
|
|
332
|
+
/** @const {Function} df - `differ()` — loose inequality (!=). */ const df = differ;
|
|
333
|
+
|
|
334
|
+
/** @const {Function} xv - `exact()` — strict equality (===). */ const xv = exact;
|
|
335
|
+
/** @const {Function} nxv - `notExact()` — strict inequality (!==). */ const nxv = notExact;
|
|
336
|
+
/** @const {Function} xnv - `exactlyNot()` — strictly not equal. */ const xnv = exactlyNot;
|
|
337
|
+
/** @const {Function} xm - `exactMatches()` — multi-value strict match. */ const xm = exactMatches;
|
|
338
|
+
/** @const {Function} nx - `notExactMatches()` — none match strictly. */ const nx = notExactMatches;
|
|
339
|
+
/** @const {Function} xnm - `exactlyNotMatches()` — all differ strictly. */ const xnm = exactlyNotMatches;
|
|
340
|
+
|
|
341
|
+
/** @const {Function} ev - `equals()` — deep equality. */ const ev = equals;
|
|
342
|
+
/** @const {Function} nev - `notEquals()` — deep inequality. */ const nev = notEquals;
|
|
343
|
+
|
|
344
|
+
/** @const {Function} gtv - `gatherThan()` — greater than (>). */ const gtv = gatherThan;
|
|
345
|
+
/** @const {Function} ltv - `lessThan()` — less than (<). */ const ltv = lessThan;
|
|
346
|
+
/** @const {Function} ngt - `notGatherThan()` — not greater than. */ const ngt = notGatherThan;
|
|
347
|
+
/** @const {Function} nlt - `notLessThan()` — not less than. */ const nlt = notLessThan;
|
|
348
|
+
|
|
349
|
+
/** @const {Function} gev - `gatherOrEquals()` — greater or equal (>=). */ const gev = gatherOrEquals;
|
|
350
|
+
/** @const {Function} lev - `lessOrEquals()` — less or equal (<=). */ const lev = lessOrEquals;
|
|
351
|
+
/** @const {Function} nge - `notGatherAndEquals()` — strictly less (<). */ const nge = notGatherAndEquals;
|
|
352
|
+
/** @const {Function} nle - `notLessAndEquals()` — strictly greater (>). */ const nle = notLessAndEquals;
|
|
353
|
+
|
|
354
|
+
/** @const {Function} fc - `isFalseCase()` — is falsy case. */ const fc = isFalseCase;
|
|
355
|
+
/** @const {Function} nfc - `isNotFalseCase()` — is truthy case. */ const nfc = isNotFalseCase;
|
|
356
|
+
|
|
357
|
+
/** @const {Function} xu - `isUndefined()` — === undefined. */ const xu = isUndefined;
|
|
358
|
+
/** @const {Function} xn - `isNull()` — === null. */ const xn = isNull;
|
|
359
|
+
/** @const {Function} xt - `isExactTrue()` — === true. */ const xt = isExactTrue;
|
|
360
|
+
/** @const {Function} xf - `isExactFalse()` — === false. */ const xf = isExactFalse;
|
|
361
|
+
|
|
362
|
+
/** @const {Function} nxu - `isNotUndefined()` — !== undefined. */ const nxu = isNotUndefined;
|
|
363
|
+
/** @const {Function} nxn - `isNotNull()` — !== null. */ const nxn = isNotNull;
|
|
364
|
+
/** @const {Function} nxt - `isNotTrue()` — !== true. */ const nxt = isNotTrue;
|
|
365
|
+
/** @const {Function} nxf - `isNotFalse()` — !== false. */ const nxf = isNotFalse;
|
|
366
|
+
|
|
367
|
+
/** @const {Function} en - `isNully()` — null or undefined. */ const en = isNully;
|
|
368
|
+
/** @const {Function} et - `isTruely()` — truthy. */ const et = isTruely;
|
|
369
|
+
/** @const {Function} ef - `isFalsely()` — falsy. */ const ef = isFalsely;
|
|
370
|
+
/** @const {Function} ee - `isEmpty()` — empty. */ const ee = isEmpty;
|
|
371
|
+
|
|
372
|
+
/** @const {Function} nn - `isNotNully()` — not null/undefined. */ const nn = isNotNully;
|
|
373
|
+
/** @const {Function} nt - `isNotTruely()`. */ const nt = isNotTruely;
|
|
374
|
+
/** @const {Function} nf - `isNotFalsely()`. */ const nf = isNotFalsely;
|
|
375
|
+
/** @const {Function} ne - `isNotEmpty()`. */ const ne = isNotEmpty;
|
|
376
|
+
|
|
377
|
+
/** @const {Function} noe - `isNullOrEmpty()` — null or empty. */ const noe = isNullOrEmpty;
|
|
378
|
+
/**
|
|
379
|
+
* Checks whether the value is not null, not undefined, and not empty string.
|
|
380
|
+
* @const {Function} nne - `isNotNullAndEmpty()`.
|
|
381
|
+
* @param {*} value - Value to check.
|
|
382
|
+
* @returns {boolean} `true` if the value is meaningful.
|
|
383
|
+
*/
|
|
377
384
|
const nne = isNotNullAndEmpty;
|
|
378
385
|
|
|
379
386
|
|
|
380
387
|
// quick execute by conditions constant
|
|
381
|
-
const inoe = ifNullOrEmpty;
|
|
382
|
-
const inne = ifNotNullAndEmpty;
|
|
388
|
+
/** @const {Function} inoe - `ifNullOrEmpty()` — execute if null or empty. */ const inoe = ifNullOrEmpty;
|
|
389
|
+
/** @const {Function} inne - `ifNotNullAndEmpty()` — execute if not null/empty. */ const inne = ifNotNullAndEmpty;
|
|
383
390
|
|
|
384
391
|
|
|
385
392
|
// do and return inline double takes
|
|
386
|
-
const dr = doAndReturn;
|
|
387
|
-
const drx = doAndReturnByExecute;
|
|
393
|
+
/** @const {Function} dr - `doAndReturn()` — execute and return value. */ const dr = doAndReturn;
|
|
394
|
+
/** @const {Function} drx - `doAndReturnByExecute()` — execute and return result. */ const drx = doAndReturnByExecute;
|
|
388
395
|
|
|
389
396
|
|
|
390
397
|
// object method shortcut constant
|
|
391
|
-
const ok = keysOf;
|
|
392
|
-
const ov = valuesOf;
|
|
393
|
-
const oe = entriesOf;
|
|
394
|
-
const oc = countOf;
|
|
398
|
+
/** @const {Function} ok - `keysOf()` — Object.keys(). */ const ok = keysOf;
|
|
399
|
+
/** @const {Function} ov - `valuesOf()` — Object.values(). */ const ov = valuesOf;
|
|
400
|
+
/** @const {Function} oe - `entriesOf()` — Object.entries(). */ const oe = entriesOf;
|
|
401
|
+
/** @const {Function} oc - `countOf()` — key count. */ const oc = countOf;
|
|
395
402
|
|
|
396
|
-
const occ = checkCount;
|
|
403
|
+
/** @const {Function} occ - `checkCount()` — filtered key count. */ const occ = checkCount;
|
|
397
404
|
|
|
398
405
|
|
|
399
|
-
// match case constant
|
|
400
|
-
const mc = matchCase;
|
|
401
|
-
const ec = equalCase;
|
|
402
|
-
const xc = exactCase;
|
|
403
|
-
const tc = typeCase;
|
|
404
|
-
const cc = classCase;
|
|
405
|
-
const kc = kindCase;
|
|
406
|
+
// match case constant — pattern matching function aliases
|
|
407
|
+
/** @const {Function} mc - `matchCase()` — condition matching. */ const mc = matchCase;
|
|
408
|
+
/** @const {Function} ec - `equalCase()` — `==` based matching. */ const ec = equalCase;
|
|
409
|
+
/** @const {Function} xc - `exactCase()` — `===` based matching. */ const xc = exactCase;
|
|
410
|
+
/** @const {Function} tc - `typeCase()` — typeof based matching. */ const tc = typeCase;
|
|
411
|
+
/** @const {Function} cc - `classCase()` — class based matching. */ const cc = classCase;
|
|
412
|
+
/** @const {Function} kc - `kindCase()` — kind-based matching. */ const kc = kindCase;
|
|
406
413
|
|
|
407
414
|
|
|
408
|
-
/** variable data copy */
|
|
409
|
-
const cp = copy;
|
|
410
|
-
const mk = mock;
|
|
411
|
-
const mm = mimic;
|
|
412
|
-
const tw = twin;
|
|
413
|
-
const cn = clone;
|
|
415
|
+
/** variable data copy — object copy/merge utility aliases */
|
|
416
|
+
/** @const {Function} cp - `copy()` — deep copy. */ const cp = copy;
|
|
417
|
+
/** @const {Function} mk - `mock()` — shallow clone. */ const mk = mock;
|
|
418
|
+
/** @const {Function} mm - `mimic()` — structural clone. */ const mm = mimic;
|
|
419
|
+
/** @const {Function} tw - `twin()` — identical clone. */ const tw = twin;
|
|
420
|
+
/** @const {Function} cn - `clone()` — full clone. */ const cn = clone;
|
|
414
421
|
|
|
415
|
-
const pc = patch;
|
|
416
|
-
const ow = overwrite;
|
|
417
|
-
const tk = takeover;
|
|
418
|
-
const aq = acquire;
|
|
419
|
-
const ih = inherit;
|
|
422
|
+
/** @const {Function} pc - `patch()` — property patch. */ const pc = patch;
|
|
423
|
+
/** @const {Function} ow - `overwrite()` — overwrite. */ const ow = overwrite;
|
|
424
|
+
/** @const {Function} tk - `takeover()` — takeover. */ const tk = takeover;
|
|
425
|
+
/** @const {Function} aq - `acquire()` — acquire. */ const aq = acquire;
|
|
426
|
+
/** @const {Function} ih - `inherit()` — inherit. */ const ih = inherit;
|
|
420
427
|
|
|
421
|
-
const rv = revert;
|
|
428
|
+
/** @const {Function} rv - `revert()` — revert. */ const rv = revert;
|
|
422
429
|
|
|
423
430
|
|
|
424
|
-
/** run handle */
|
|
425
|
-
const pq = postQueue;
|
|
426
|
-
const pd = postDelayed;
|
|
427
|
-
const pp = postPromise;
|
|
428
|
-
const pb = postBonded;
|
|
429
|
-
const ppq = postPromiseQueue;
|
|
430
|
-
const paq = postAsyncQueue;
|
|
431
|
-
const pwq = postAwaitQueue;
|
|
432
|
-
const pfq = postFrameQueue;
|
|
433
|
-
const pfp = postFramePromise;
|
|
431
|
+
/** run handle — async execution utility aliases */
|
|
432
|
+
/** @const {Function} pq - `postQueue()` — schedules a task on the microtask queue. */ const pq = postQueue;
|
|
433
|
+
/** @const {Function} pd - `postDelayed()` — delayed execution. */ const pd = postDelayed;
|
|
434
|
+
/** @const {Function} pp - `postPromise()` — Promise wrapper. */ const pp = postPromise;
|
|
435
|
+
/** @const {Function} pb - `postBonded()` — bonded Promise. */ const pb = postBonded;
|
|
436
|
+
/** @const {Function} ppq - `postPromiseQueue()` — Promise queue. */ const ppq = postPromiseQueue;
|
|
437
|
+
/** @const {Function} paq - `postAsyncQueue()` — async queue. */ const paq = postAsyncQueue;
|
|
438
|
+
/** @const {Function} pwq - `postAwaitQueue()` — await queue. */ const pwq = postAwaitQueue;
|
|
439
|
+
/** @const {Function} pfq - `postFrameQueue()` — requestAnimationFrame queue. */ const pfq = postFrameQueue;
|
|
440
|
+
/** @const {Function} pfp - `postFramePromise()` — requestAnimationFrame Promise. */ const pfp = postFramePromise;
|
|
434
441
|
|
|
435
442
|
|
|
436
443
|
// Object function shortcut constants
|
|
437
|
-
const dsp = defineStaticProperty;
|
|
438
|
-
const dp = defineProperty;
|
|
439
|
-
const dpx = definePropertyPlex;
|
|
440
|
-
const dspgs = defineStaticGetterAndSetter;
|
|
441
|
-
const dpgs = defineGetterAndSetter;
|
|
442
|
-
const dpgsx = defineGetterAndSetterPlex;
|
|
444
|
+
/** @const {Function} dsp - `defineStaticProperty()`. */ const dsp = defineStaticProperty;
|
|
445
|
+
/** @const {Function} dp - `defineProperty()`. */ const dp = defineProperty;
|
|
446
|
+
/** @const {Function} dpx - `definePropertyPlex()`. */ const dpx = definePropertyPlex;
|
|
447
|
+
/** @const {Function} dspgs - `defineStaticGetterAndSetter()`. */ const dspgs = defineStaticGetterAndSetter;
|
|
448
|
+
/** @const {Function} dpgs - `defineGetterAndSetter()`. */ const dpgs = defineGetterAndSetter;
|
|
449
|
+
/** @const {Function} dpgsx - `defineGetterAndSetterPlex()`. */ const dpgsx = defineGetterAndSetterPlex;
|
|
443
450
|
|
|
444
451
|
|
|
445
452
|
// Regex builder alias
|
|
446
|
-
const rx = (regex, flags) => new RegExp(regex, flags);
|
|
447
|
-
const reg = rx;
|
|
448
|
-
const ri = regex => new RegExp(regex, "i");
|
|
449
|
-
const rg = regex => new RegExp(regex, "g");
|
|
450
|
-
const rm = regex => new RegExp(regex, "m");
|
|
451
|
-
const rig = regex => new RegExp(regex, "ig");
|
|
452
|
-
const rim = regex => new RegExp(regex, "im");
|
|
453
|
-
const rgm = regex => new RegExp(regex, "gm");
|
|
454
|
-
const rigm = regex => new RegExp(regex, "igm");
|
|
453
|
+
/** @const {Function} rx - RegExp builder with flags. */ const rx = (regex, flags) => new RegExp(regex, flags);
|
|
454
|
+
/** @const {Function} reg - `rx` alias. */ const reg = rx;
|
|
455
|
+
/** @const {Function} ri - RegExp with `"i"` flag. */ const ri = regex => new RegExp(regex, "i");
|
|
456
|
+
/** @const {Function} rg - RegExp with `"g"` flag. */ const rg = regex => new RegExp(regex, "g");
|
|
457
|
+
/** @const {Function} rm - RegExp with `"m"` flag. */ const rm = regex => new RegExp(regex, "m");
|
|
458
|
+
/** @const {Function} rig - RegExp with `"ig"` flags. */ const rig = regex => new RegExp(regex, "ig");
|
|
459
|
+
/** @const {Function} rim - RegExp with `"im"` flags. */ const rim = regex => new RegExp(regex, "im");
|
|
460
|
+
/** @const {Function} rgm - RegExp with `"gm"` flags. */ const rgm = regex => new RegExp(regex, "gm");
|
|
461
|
+
/** @const {Function} rigm - RegExp with `"igm"` flags. */ const rigm = regex => new RegExp(regex, "igm");
|
|
455
462
|
|
|
456
463
|
|
|
457
464
|
// additional static function for classes
|