alienese 0.5.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/alienese.js +734 -365
  2. package/package.json +2 -2
package/alienese.js CHANGED
@@ -26,13 +26,13 @@ SOFTWARE.
26
26
 
27
27
  */
28
28
 
29
- // Alienise.js - Estre javscript Alienese patch //
29
+ // Alienise.js - Estre javascript Alienese patch //
30
30
  //
31
31
  // A collection of aliases for shortening and simplifying JavaScript code.
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.5.2 / release 2026.01.01
35
+ // v0.6.0 / release 2026.01.03
36
36
  //
37
37
  // * Must be loaded modernism.js before this script.
38
38
  //
@@ -46,396 +46,407 @@ if (typeof require !== 'undefined' && typeof module !== 'undefined') {
46
46
  try { require("modernism"); } catch (e) {}
47
47
  }
48
48
 
49
- let _gb = _global ?? (typeof globalThis !== 'undefined') ? globalThis : (typeof window !== 'undefined' ? window : global);
50
- let dfg = defineGlobal ?? ((name, value) => {
51
- Object.defineProperty(_gb, name, {
52
- value: value,
53
- writable: false,
54
- configurable: false,
55
- enumerable: false
56
- });
57
- });
49
+ const _gb = _global ?? (typeof globalThis !== 'undefined') ? globalThis : (typeof window !== 'undefined' ? window : global);
50
+ const dfg = defineGlobal ?? ((name, value) => Object.defineProperty(_gb, name, {
51
+ value: value,
52
+ writable: false,
53
+ configurable: false,
54
+ enumerable: false
55
+ }));
58
56
 
59
57
 
60
58
  // common letter constants
61
- dfg("_0", "0");
62
- dfg("_1", "1");
63
- dfg("_2", "2");
64
- dfg("_3", "3");
65
- dfg("_4", "4");
66
- dfg("_5", "5");
67
- dfg("_6", "6");
68
- dfg("_7", "7");
69
- dfg("_8", "8");
70
- dfg("_9", "9");
71
-
72
- dfg("_a", "a");
73
- dfg("_b", "b");
74
- dfg("_c", "c");
75
- dfg("_d", "d");
76
- dfg("_e", "e");
77
- dfg("_f", "f");
78
- dfg("_g", "g");
79
- dfg("_h", "h");
80
- dfg("_i", "i");
81
- dfg("_j", "j");
82
- dfg("_k", "k");
83
- dfg("_l", "l");
84
- dfg("_m", "m");
85
- dfg("_n", "n");
86
- dfg("_o", "o");
87
- dfg("_p", "p");
88
- dfg("_q", "q");
89
- dfg("_r", "r");
90
- dfg("_s", "s");
91
- dfg("_t", "t");
92
- dfg("_u", "u");
93
- dfg("_v", "v");
94
- dfg("_w", "w");
95
- dfg("_x", "x");
96
- dfg("_y", "y");
97
- dfg("_z", "z");
98
-
99
- dfg("_A", "A");
100
- dfg("_B", "B");
101
- dfg("_C", "C");
102
- dfg("_D", "D");
103
- dfg("_E", "E");
104
- dfg("_F", "F");
105
- dfg("_G", "G");
106
- dfg("_H", "H");
107
- dfg("_I", "I");
108
- dfg("_J", "J");
109
- dfg("_K", "K");
110
- dfg("_L", "L");
111
- dfg("_M", "M");
112
- dfg("_N", "N");
113
- dfg("_O", "O");
114
- dfg("_P", "P");
115
- dfg("_Q", "Q");
116
- dfg("_R", "R");
117
- dfg("_S", "S");
118
- dfg("_T", "T");
119
- dfg("_U", "U");
120
- dfg("_V", "V");
121
- dfg("_W", "W");
122
- dfg("_X", "X");
123
- dfg("_Y", "Y");
124
- dfg("_Z", "Z");
59
+ const _0 = "0";
60
+ const _1 = "1";
61
+ const _2 = "2";
62
+ const _3 = "3";
63
+ const _4 = "4";
64
+ const _5 = "5";
65
+ const _6 = "6";
66
+ const _7 = "7";
67
+ const _8 = "8";
68
+ const _9 = "9";
69
+
70
+ const _a = "a";
71
+ const _b = "b";
72
+ const _c = "c";
73
+ const _d = "d";
74
+ const _e = "e";
75
+ const _f = "f";
76
+ const _g = "g";
77
+ const _h = "h";
78
+ const _i = "i";
79
+ const _j = "j";
80
+ const _k = "k";
81
+ const _l = "l";
82
+ const _m = "m";
83
+ const _n = "n";
84
+ const _o = "o";
85
+ const _p = "p";
86
+ const _q = "q";
87
+ const _r = "r";
88
+ const _s = "s";
89
+ const _t = "t";
90
+ const _u = "u";
91
+ const _v = "v";
92
+ const _w = "w";
93
+ const _x = "x";
94
+ const _y = "y";
95
+ const _z = "z";
96
+
97
+ const _A = "A";
98
+ const _B = "B";
99
+ const _C = "C";
100
+ const _D = "D";
101
+ const _E = "E";
102
+ const _F = "F";
103
+ const _G = "G";
104
+ const _H = "H";
105
+ const _I = "I";
106
+ const _J = "J";
107
+ const _K = "K";
108
+ const _L = "L";
109
+ const _M = "M";
110
+ const _N = "N";
111
+ const _O = "O";
112
+ const _P = "P";
113
+ const _Q = "Q";
114
+ const _R = "R";
115
+ const _S = "S";
116
+ const _T = "T";
117
+ const _U = "U";
118
+ const _V = "V";
119
+ const _W = "W";
120
+ const _X = "X";
121
+ const _Y = "Y";
122
+ const _Z = "Z";
125
123
 
126
124
 
127
125
  // common extra characters constants
128
- dfg("lr", "(");
129
- dfg("rr", ")");
130
- dfg("lc", "{");
131
- dfg("rc", "}");
132
- dfg("ls", "[");
133
- dfg("rs", "]");
134
- dfg("lt", "<");
135
- dfg("gt", ">");
136
- dfg("ab", lt + gt);
137
- dfg("cb", gt + lt);
138
- dfg("ti", "~");
139
- dfg("ep", "!");
140
- dfg("em", ep);
141
- dfg("at", "@");
142
- dfg("ds", "$");
143
- dfg("ms", "&");
144
- dfg("ps", "%");
145
- dfg("cf", "^");
146
- dfg("ak", "*");
147
- dfg("mp", ak);
148
- dfg("ad", "+");
149
- dfg("add", ad + ad);
150
- dfg("hp", "-");
151
- dfg("sr", hp);
152
- dfg("srr", sr + sr);
153
- dfg("us", "_");
154
- dfg("eq", "=");
155
- dfg("vl", "|");
156
- dfg("bs", "\\");
157
- dfg("ss", "/");
158
- dfg("dv", ss);
159
- dfg("qm", "?");
160
- dfg("nl", ep + eq);
161
- dfg("le", lt + eq);
162
- dfg("ge", gt + eq);
163
- dfg("fa", ad + eq);
164
- dfg("fs", sr + eq);
165
- dfg("fm", mp + eq);
166
- dfg("fd", dv + eq);
167
- dfg("sq", "'");
168
- dfg("dq", '"');
169
- dfg("gv", '`');
170
- dfg("cl", ":");
171
- dfg("sc", ";");
172
- dfg("cm", ",");
173
- dfg("es", "");
174
- dfg("l", cm);
175
- dfg("s", " ");
176
- dfg("i", "#");
177
- dfg("d", ".");
178
-
179
- dfg("cr", "\r");
180
- dfg("lf", "\n");
181
- dfg("crlf", cr + lf);
182
- dfg("lfcr", lf + cr);
183
- dfg("tab", "\t");
184
-
185
- dfg("ecr", "\\r");
186
- dfg("elf", "\\n");
187
- dfg("ecrlf", ecr + elf);
188
- dfg("elfcr", elf + ecr);
189
- dfg("etab", "\\t");
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";
190
188
 
191
189
 
192
190
  // primitive types alias constant
193
- dfg("U", UNDEFINED);
194
- dfg("N", NULL);
195
- dfg("T", TRUE);
196
- dfg("F", FALSE);
191
+ const U = UNDEFINED;
192
+ const N = NULL;
193
+ const T = TRUE;
194
+ const F = FALSE;
197
195
 
198
- dfg("u", undefined);
199
- dfg("n", null);
200
- dfg("t", true);
201
- dfg("f", false);
196
+ const u = undefined;
197
+ const n = null;
198
+ const t = true;
199
+ const f = false;
202
200
 
203
201
  // end point assigner constant
204
- dfg("eoo", _gb.u);
205
- dfg("eoa", _gb.u);
202
+ const eoo = u;
203
+ const eoa = u;
206
204
 
207
205
  // prototype of primitive types alias constant
208
- dfg("FNC", _gb.FUNCTION);
209
- dfg("BLE", _gb.BOOLEAN);
210
- dfg("STR", _gb.STRING);
211
- dfg("SYM", _gb.SYMBOL);
212
- dfg("NUM", _gb.NUMBER);
213
- dfg("BIG", _gb.BIGINT);
214
- dfg("OBJ", _gb.OBJECT);
215
-
216
- dfg("fun", Function);
217
- dfg("ble", Boolean);
218
- dfg("str", String);
219
- dfg("sym", Symbol);
220
- dfg("num", Number);
221
- dfg("big", BigInt);
222
- dfg("obj", Object);
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;
223
221
 
224
222
  // class names of primitive types constant
225
- dfg("FN", _gb._FUNCTION);
226
- dfg("BL", _gb._BOOLEAN);
227
- dfg("ST", _gb._STRING);
228
- dfg("SY", _gb._SYMBOL);
229
- dfg("NO", _gb._NUMBER);
230
- dfg("BI", _gb._BIG_INT);
231
- dfg("OJ", _gb._OBJECT);
232
-
233
- dfg("fn", Function);
234
- dfg("bl", Boolean);
235
- dfg("sg", String);
236
- dfg("sl", Symbol);
237
- dfg("no", Number);
238
- dfg("bi", BigInt);
239
- dfg("oj", Object);
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;
240
238
 
241
239
 
242
240
  // frequent object types alias constant
243
- dfg("DT", _gb._DATE);
241
+ const DT = _DATE;
244
242
 
245
- dfg("RA", _gb._ARRAY);
246
- dfg("SA", _gb._SET);
247
- dfg("MA", _gb._MAP);
243
+ const RA = _ARRAY;
244
+ const SA = _SET;
245
+ const MA = _MAP;
248
246
 
249
- dfg("dt", Date);
247
+ const dt = Date;
250
248
 
251
- dfg("ra", Array);
252
- dfg("sa", Set);
253
- dfg("ma", Map);
249
+ const ra = Array;
250
+ const sa = Set;
251
+ const ma = Map;
254
252
 
255
253
 
256
254
  // frequent assign types alias constant
257
- dfg("def", _gb.DEFAULT);
258
- dfg("fin", _gb.FINALLY);
255
+ const def = DEFAULT;
256
+ const fin = FINALLY;
259
257
 
260
258
 
261
259
  // frequent object types empty object issuer alias constant
262
- dfg("x", {
260
+ const x = {
263
261
  get a() { return new Array(); },
264
262
  get d() { return new Date(); },
265
263
  get t() { return new Set(); },
266
264
  get p() { return new Map(); },
267
- });
265
+ };
268
266
 
269
267
 
270
268
  // bypass constant
271
- dfg("ifx", _gb.executeIf);
272
- dfg("itx", _gb.executeWhen);
269
+ const ifx = executeIf;
270
+ const itx = executeWhen;
273
271
 
274
- dfg("ifr", _gb.ifReturn);
272
+ const ifr = ifReturn;
275
273
 
276
- dfg("roen", _gb.ifReturnOrEmptyNumber);
277
- dfg("roes", _gb.ifReturnOrEmptyString);
278
- dfg("roea", _gb.ifReturnOrEmptyArray);
279
- dfg("roeo", _gb.ifReturnOrEmptyObject);
274
+ const roen = ifReturnOrEmptyNumber;
275
+ const roes = ifReturnOrEmptyString;
276
+ const roea = ifReturnOrEmptyArray;
277
+ const roeo = ifReturnOrEmptyObject;
280
278
 
281
- dfg("val", _gb.valet);
279
+ const val = valet;
282
280
 
283
281
 
284
282
  // common process shortcut constant
285
- dfg("f02b", _gb.forZeroToBefore);
286
- dfg("f02r", _gb.forZeroToReach);
283
+ const f02b = forZeroToBefore;
284
+ const f02r = forZeroToReach;
287
285
 
288
- dfg("f20", _gb.forToZeroFrom);
289
- dfg("f21", _gb.forToPrimeFrom);
286
+ const f20 = forToZeroFrom;
287
+ const f21 = forToPrimeFrom;
290
288
 
291
- dfg("ff", _gb.forForward);
292
- dfg("fb", _gb.forBackward);
289
+ const ff = forForward;
290
+ const fb = forBackward;
293
291
 
294
- dfg("fi", _gb.forin);
295
- dfg("fiv", _gb.forinner);
292
+ const fi = forin;
293
+ const fiv = forinner;
296
294
 
297
- dfg("fo", _gb.forof);
298
- dfg("fkv", _gb.forkv);
295
+ const fo = forof;
296
+ const fkv = forkv;
299
297
 
300
- dfg("w", _gb.whileIn);
301
- dfg("dw", _gb.doWhileIn);
298
+ const w = whileIn;
299
+ const dw = doWhileIn;
302
300
 
303
301
 
304
302
  // meaning comparator constant
305
- dfg("to", _gb.typeOf);
306
-
307
- dfg("tm", _gb.typeMatch);
308
-
309
- dfg("tu", _gb.typeUndefined);
310
- dfg("tf", _gb.typeFunction);
311
- dfg("tb", _gb.typeBoolean);
312
- dfg("ts", _gb.typeString);
313
- dfg("ty", _gb.typeSymbol);
314
- dfg("tn", _gb.typeNumber);
315
- dfg("tg", _gb.typeBigint);
316
- dfg("tj", _gb.typeObject);
317
-
318
- dfg("im", _gb.instanceMatch);
319
- dfg("io", _gb.isObject);
320
- dfg("ia", _gb.isArray);
321
- dfg("ioa", _gb.isArray);
322
- dfg("ios", _gb.isString);
323
- dfg("ion", _gb.isNumber);
324
- dfg("iot", _gb.isSet);
325
- dfg("iop", _gb.isMap);
326
-
327
- dfg("xv", _gb.exact);
328
- dfg("nxv", _gb.notExact);
329
- dfg("xnv", _gb.exactlyNot);
330
- dfg("xm", _gb.exactMatches);
331
- dfg("nx", _gb.notExactMatches);
332
- dfg("xnm", _gb.exactlyNotMatches);
333
-
334
- dfg("ev", _gb.equals);
335
- dfg("nev", _gb.notEquals);
336
- dfg("sm", _gb.same);
337
- dfg("df", _gb.different);
338
-
339
- dfg("gtv", _gb.getherThan);
340
- dfg("ltv", _gb.lessThan);
341
- dfg("ngt", _gb.notGetherThan);
342
- dfg("nlt", _gb.notLessThan);
343
-
344
- dfg("gev", _gb.getherOrEquals);
345
- dfg("lev", _gb.lessOrEquels);
346
- dfg("nge", _gb.notGetherAndEquals);
347
- dfg("nle", _gb.notLessAndEquals);
348
-
349
- dfg("fc", _gb.isFalseCase);
350
- dfg("nfc", _gb.isNotFalseCase);
351
-
352
- dfg("xu", _gb.isUndefined);
353
- dfg("xn", _gb.isNull);
354
- dfg("xt", _gb.isExactTrue);
355
- dfg("xf", _gb.isExactFalse);
356
-
357
- dfg("nxu", _gb.isNotUndefined);
358
- dfg("nxn", _gb.isNotNull);
359
- dfg("nxt", _gb.isNotTrue);
360
- dfg("nxf", _gb.isNotFalse);
361
-
362
- dfg("en", _gb.isNully);
363
- dfg("et", _gb.isTruely);
364
- dfg("ef", _gb.isFalsely);
365
- dfg("ee", _gb.isEmpty);
366
-
367
- dfg("nn", _gb.isNotNully);
368
- dfg("nt", _gb.isNotTruely);
369
- dfg("nf", _gb.isNotFalsely);
370
- dfg("ne", _gb.isNotEmpty);
371
-
372
- dfg("noe", _gb.isNullOrEmpty);
373
- dfg("nne", _gb.isNotNullAndEmpty);
303
+ const to = typeOf;
304
+
305
+ const tm = typeMatch;
306
+
307
+ const tu = typeUndefined;
308
+ const tf = typeFunction;
309
+ const tb = typeBoolean;
310
+ const ts = typeString;
311
+ const ty = typeSymbol;
312
+ const tn = typeNumber;
313
+ const tg = typeBigint;
314
+ const tj = typeObject;
315
+
316
+ const im = instanceMatch;
317
+ const io = isObject;
318
+ const ia = isArray;
319
+ const ioa = isArray;
320
+ const ios = isString;
321
+ const ion = isNumber;
322
+ const iot = isSet;
323
+ const iop = isMap;
324
+
325
+ const sm = same;
326
+ const df = differ;
327
+
328
+ const xv = exact;
329
+ const nxv = notExact;
330
+ const xnv = exactlyNot;
331
+ const xm = exactMatches;
332
+ const nx = notExactMatches;
333
+ const xnm = exactlyNotMatches;
334
+
335
+ const ev = equals;
336
+ const nev = notEquals;
337
+
338
+ const gtv = gatherThan;
339
+ const ltv = lessThan;
340
+ const ngt = notGatherThan;
341
+ const nlt = notLessThan;
342
+
343
+ const gev = gatherOrEquals;
344
+ const lev = lessOrEquals;
345
+ const nge = notGatherAndEquals;
346
+ const nle = notLessAndEquals;
347
+
348
+ const fc = isFalseCase;
349
+ const nfc = isNotFalseCase;
350
+
351
+ const xu = isUndefined;
352
+ const xn = isNull;
353
+ const xt = isExactTrue;
354
+ const xf = isExactFalse;
355
+
356
+ const nxu = isNotUndefined;
357
+ const nxn = isNotNull;
358
+ const nxt = isNotTrue;
359
+ const nxf = isNotFalse;
360
+
361
+ const en = isNully;
362
+ const et = isTruely;
363
+ const ef = isFalsely;
364
+ const ee = isEmpty;
365
+
366
+ const nn = isNotNully;
367
+ const nt = isNotTruely;
368
+ const nf = isNotFalsely;
369
+ const ne = isNotEmpty;
370
+
371
+ const noe = isNullOrEmpty;
372
+ const nne = isNotNullAndEmpty;
374
373
 
375
374
 
376
375
  // quick execute by conditions constant
377
- dfg("inoe", _gb.ifNullOrEmpty);
378
- dfg("inne", _gb.ifNotNullAndEmpty);
376
+ const inoe = ifNullOrEmpty;
377
+ const inne = ifNotNullAndEmpty;
379
378
 
380
379
 
381
380
  // do and return inline double takes
382
- dfg("dr", _gb.doAndReturn);
383
- dfg("drx", _gb.doAndReturnByExecute);
381
+ const dr = doAndReturn;
382
+ const drx = doAndReturnByExecute;
384
383
 
385
384
 
386
385
  // object method shortcut constant
387
- dfg("ok", _gb.keysOf);
388
- dfg("ov", _gb.valuesOf);
389
- dfg("oe", _gb.entriesOf);
390
- dfg("oc", _gb.countOf);
386
+ const ok = keysOf;
387
+ const ov = valuesOf;
388
+ const oe = entriesOf;
389
+ const oc = countOf;
391
390
 
392
- dfg("occ", _gb.checkCount);
391
+ const occ = checkCount;
393
392
 
394
393
 
395
394
  // match case constant
396
- dfg("mc", _gb.matchCase);
397
- dfg("ec", _gb.equalCase);
398
- dfg("xc", _gb.exactCase);
399
- dfg("tc", _gb.typeCase);
400
- dfg("cc", _gb.classCase);
401
- dfg("kc", _gb.kindCase);
395
+ const mc = matchCase;
396
+ const ec = equalCase;
397
+ const xc = exactCase;
398
+ const tc = typeCase;
399
+ const cc = classCase;
400
+ const kc = kindCase;
402
401
 
403
402
 
404
403
  /** variable data copy */
405
- dfg("cp", _gb.copy);
406
- dfg("mk", _gb.mock);
407
- dfg("mm", _gb.mimic);
408
- dfg("tw", _gb.twin);
409
- dfg("cn", _gb.clone);
404
+ const cp = copy;
405
+ const mk = mock;
406
+ const mm = mimic;
407
+ const tw = twin;
408
+ const cn = clone;
410
409
 
411
- dfg("pc", _gb.patch);
412
- dfg("ow", _gb.overwrite);
413
- dfg("tk", _gb.takeover);
414
- dfg("aq", _gb.acquire);
415
- dfg("ih", _gb.inherit);
410
+ const pc = patch;
411
+ const ow = overwrite;
412
+ const tk = takeover;
413
+ const aq = acquire;
414
+ const ih = inherit;
416
415
 
417
- dfg("rv", _gb.revert);
416
+ const rv = revert;
418
417
 
419
418
 
420
419
  /** run handle */
421
- dfg("pq", _gb.postQueue);
422
- dfg("pd", _gb.postDelayed);
423
- dfg("pp", _gb.postPromise);
424
- dfg("pb", _gb.postBonded);
425
- dfg("ppq", _gb.postPromiseQueue);
426
- dfg("paq", _gb.postAsyncQueue);
427
- dfg("pwq", _gb.postAwaitQueue);
428
- dfg("pfq", _gb.postFrameQueue);
429
- dfg("pfp", _gb.postFramePromise);
420
+ const pq = postQueue;
421
+ const pd = postDelayed;
422
+ const pp = postPromise;
423
+ const pb = postBonded;
424
+ const ppq = postPromiseQueue;
425
+ const paq = postAsyncQueue;
426
+ const pwq = postAwaitQueue;
427
+ const pfq = postFrameQueue;
428
+ const pfp = postFramePromise;
430
429
 
431
430
 
432
431
  // Object function shortcut constants
433
- dfg("dsp", _gb.defineStaticProperty);
434
- dfg("dp", _gb.defineProperty);
435
- dfg("dpx", _gb.definePropertyPlex);
436
- dfg("dspgs", _gb.defineStaticGetterAndSetter);
437
- dfg("dpgs", _gb.defineGetterAndSetter);
438
- dfg("dpgsx", _gb.defineGetterAndSetterPlex);
432
+ const dsp = defineStaticProperty;
433
+ const dp = defineProperty;
434
+ const dpx = definePropertyPlex;
435
+ const dspgs = defineStaticGetterAndSetter;
436
+ const dpgs = defineGetterAndSetter;
437
+ const dpgsx = defineGetterAndSetterPlex;
438
+
439
+
440
+ // Regex builder alias
441
+ const rx = (regex, flags) => new RegExp(regex, flags);
442
+ const reg = rx;
443
+ const ri = regex => new RegExp(regex, "i");
444
+ const rg = regex => new RegExp(regex, "g");
445
+ const rm = regex => new RegExp(regex, "m");
446
+ const rig = regex => new RegExp(regex, "ig");
447
+ const rim = regex => new RegExp(regex, "im");
448
+ const rgm = regex => new RegExp(regex, "gm");
449
+ const rigm = regex => new RegExp(regex, "igm");
439
450
 
440
451
 
441
452
  // additional static function for classes
@@ -446,50 +457,50 @@ defineStaticGetterAndSetter(dt, "msd", function () { return this.ms.string.padSt
446
457
 
447
458
 
448
459
  // additional global prototype functions
449
- definePropertyPlex("mc", function () { return _gb.matchCase(this.it, ...arguments); });
450
- definePropertyPlex("ec", function () { return _gb.equalCase(this.it, ...arguments); });
451
- definePropertyPlex("xc", function () { return _gb.exactCase(this.it, ...arguments); });
452
- definePropertyPlex("tc", function () { return _gb.typeCase(this.it, ...arguments); });
453
- definePropertyPlex("cc", function () { return _gb.classCase(this.it, ...arguments); });
454
- definePropertyPlex("kc", function () { return _gb.kindCase(this.it, ...arguments); });
455
-
456
- definePropertyPlex("ee", function (process = it => it, ornot = it => it, numberEmptyMatch = 0) { return _gb.isEmpty(this.it, numberEmptyMatch) ? process(this.it) : ornot(this.it); });
457
- definePropertyPlex("ne", function (process = it => it, ornot = it => it, numberEmptyMatch = 0) { return _gb.isNotEmpty(this.it, numberEmptyMatch) ? process(this.it) : ornot(this.it); });
458
-
459
- definePropertyPlex("dr", function (does = (it, args) => {}, returns, args = []) { return _gb.doAndReturn(does, returns, [this.it, ...args]); });
460
- definePropertyPlex("drx", function (does = (it, args) => {}, forReturns, args = []) { return _gb.doAndReturnByExecute(does, forReturns, [this.it, ...args]); });
461
-
462
- defineGetterAndSetter(obj, "ok", function () { return _gb.keysOf(this.it); });
463
- defineGetterAndSetter(obj, "ov", function () { return _gb.valuesOf(this.it); });
464
- defineGetterAndSetter(obj, "oe", function () { return _gb.entriesOf(this.it); });
465
- defineGetterAndSetter(obj, "oc", function () { return _gb.countOf(this.it); });
466
- defineGetterAndSetter(obj, "occ", function () { return _gb.checkCount(this.it, (k, v) => true); });
467
-
468
- defineProperty(obj, "fk", function (work = key => { return false; }) { return _gb.forof(this.it.ways, work); });
469
- defineProperty(obj, "fv", function (work = value => { return false; }) { return _gb.forof(this.it.looks, work); });
470
- defineProperty(obj, "fe", function (work = (key, value) => { return false; }) { return _gb.forkv(this.it.entire, work); });
471
- defineProperty(obj, "fkv", function (work = (key, value) => { return false; }) { return _gb.forkv(this.it.entire, work); });
460
+ definePropertyPlex("mc", function () { return matchCase(this.it, ...arguments); });
461
+ definePropertyPlex("ec", function () { return equalCase(this.it, ...arguments); });
462
+ definePropertyPlex("xc", function () { return exactCase(this.it, ...arguments); });
463
+ definePropertyPlex("tc", function () { return typeCase(this.it, ...arguments); });
464
+ definePropertyPlex("cc", function () { return classCase(this.it, ...arguments); });
465
+ definePropertyPlex("kc", function () { return kindCase(this.it, ...arguments); });
466
+
467
+ definePropertyPlex("ee", function (process = it => it, ornot = it => it, numberEmptyMatch = 0) { return isEmpty(this.it, numberEmptyMatch) ? process(this.it) : ornot(this.it); });
468
+ definePropertyPlex("ne", function (process = it => it, ornot = it => it, numberEmptyMatch = 0) { return isNotEmpty(this.it, numberEmptyMatch) ? process(this.it) : ornot(this.it); });
469
+
470
+ definePropertyPlex("dr", function (does = (it, args) => {}, returns, args = []) { return doAndReturn(does, returns, [this.it, ...args]); });
471
+ definePropertyPlex("drx", function (does = (it, args) => {}, forReturns, args = []) { return doAndReturnByExecute(does, forReturns, [this.it, ...args]); });
472
+
473
+ defineGetterAndSetter(obj, "ok", function () { return keysOf(this.it); });
474
+ defineGetterAndSetter(obj, "ov", function () { return valuesOf(this.it); });
475
+ defineGetterAndSetter(obj, "oe", function () { return entriesOf(this.it); });
476
+ defineGetterAndSetter(obj, "oc", function () { return countOf(this.it); });
477
+ defineGetterAndSetter(obj, "occ", function () { return checkCount(this.it, (k, v) => true); });
478
+
479
+ defineProperty(obj, "fk", function (work = key => { return false; }) { return forof(this.it.ways, work); });
480
+ defineProperty(obj, "fv", function (work = value => { return false; }) { return forof(this.it.looks, work); });
481
+ defineProperty(obj, "fe", function (work = (key, value) => { return false; }) { return forkv(this.it.entire, work); });
482
+ defineProperty(obj, "fkv", function (work = (key, value) => { return false; }) { return forkv(this.it.entire, work); });
472
483
 
473
484
  defineProperty(obj, "ko", function (value) { for (const [key, val] of this.it.entire) if (val === value) return key; return undefined; });
474
485
 
475
486
  defineProperty(obj, "tiw", function (key, process = (value, key, host) => value, ornot = (key, host) => host[key]) { return key in this.it ? process(this.it[key], key, this.it) : ornot(key, this.it); });
476
487
 
477
- defineProperty(obj, "cp", function (dataOnly = true, primitiveOnly = false, recusive = true) { return _gb.copy(this, dataOnly, primitiveOnly, recusive); });
478
- defineGetterAndSetter(obj, "mk", function () { return _gb.mock(this); });
479
- defineGetterAndSetter(obj, "mm", function () { return _gb.mimic(this); });
480
- defineGetterAndSetter(obj, "tw", function () { return _gb.twin(this); });
481
- defineGetterAndSetter(obj, "cl", function () { return _gb.clone(this); });
488
+ defineProperty(obj, "cp", function (dataOnly = true, primitiveOnly = false, recusive = true) { return copy(this, dataOnly, primitiveOnly, recusive); });
489
+ defineGetterAndSetter(obj, "mk", function () { return mock(this); });
490
+ defineGetterAndSetter(obj, "mm", function () { return mimic(this); });
491
+ defineGetterAndSetter(obj, "tw", function () { return twin(this); });
492
+ defineGetterAndSetter(obj, "cl", function () { return clone(this); });
482
493
 
483
- defineProperty(obj, "pc", function (from, dataOnly = true, primitiveOnly = false, recusive = true, append = false) { return _gb.patch(this.it, from, dataOnly, primitiveOnly, recusive, append); });
484
- defineProperty(obj, "ow", function (from) { return _gb.overwrite(this.it, from); });
485
- defineProperty(obj, "to", function (from) { return _gb.takeover(this.it, from); });
486
- defineProperty(obj, "aq", function (from) { return _gb.acquire(this.it, from); });
487
- defineProperty(obj, "ih", function (from) { return _gb.inherit(this.it, from); });
494
+ defineProperty(obj, "pc", function (from, dataOnly = true, primitiveOnly = false, recusive = true, append = false) { return patch(this.it, from, dataOnly, primitiveOnly, recusive, append); });
495
+ defineProperty(obj, "ow", function (from) { return overwrite(this.it, from); });
496
+ defineProperty(obj, "tk", function (from) { return takeover(this.it, from); });
497
+ defineProperty(obj, "aq", function (from) { return acquire(this.it, from); });
498
+ defineProperty(obj, "ih", function (from) { return inherit(this.it, from); });
488
499
 
489
- defineProperty(obj, "rv", function (from, dataOnly = true, primitiveOnly = false, recusive = true, exceptNew = false) { return _gb.revert(this.it, from, dataOnly, primitiveOnly, recusive, exceptNew); });
500
+ defineProperty(obj, "rv", function (from, dataOnly = true, primitiveOnly = false, recusive = true, exceptNew = false) { return revert(this.it, from, dataOnly, primitiveOnly, recusive, exceptNew); });
490
501
 
491
- definePropertyPlex("ifeq", function (that, process = it => it, ornot = it => {}) { return this.let(it => _gb.executeIf(it == that, process, [it], ornot)); });
492
- definePropertyPlex("ifneq", function (that, process = it => it, ornot = it => {}) { return this.let(it => _gb.executeIf(it != that, process, [it], ornot)); });
502
+ definePropertyPlex("ifeq", function (that, process = it => it, ornot = it => {}) { return this.let(it => executeIf(it == that, process, [it], ornot)); });
503
+ definePropertyPlex("ifneq", function (that, process = it => it, ornot = it => {}) { return this.let(it => executeIf(it != that, process, [it], ornot)); });
493
504
 
494
505
 
495
506
  // additional primitive prototype functions
@@ -574,14 +585,372 @@ defineGetterAndSetter(dt, "hmsa", function () { return this.it.timeStringArray;
574
585
  defineGetterAndSetter(dt, "hms", function () { return this.it.timeString; });
575
586
 
576
587
 
588
+ // Bind to global when not a browser
589
+ if (typeof window === U) {
590
+ dfg("_0", _0);
591
+ dfg("_1", _1);
592
+ dfg("_2", _2);
593
+ dfg("_3", _3);
594
+ dfg("_4", _4);
595
+ dfg("_5", _5);
596
+ dfg("_6", _6);
597
+ dfg("_7", _7);
598
+ dfg("_8", _8);
599
+ dfg("_9", _9);
600
+
601
+ dfg("_a", _a);
602
+ dfg("_b", _b);
603
+ dfg("_c", _c);
604
+ dfg("_d", _d);
605
+ dfg("_e", _e);
606
+ dfg("_f", _f);
607
+ dfg("_g", _g);
608
+ dfg("_h", _h);
609
+ dfg("_i", _i);
610
+ dfg("_j", _j);
611
+ dfg("_k", _k);
612
+ dfg("_l", _l);
613
+ dfg("_m", _m);
614
+ dfg("_n", _n);
615
+ dfg("_o", _o);
616
+ dfg("_p", _p);
617
+ dfg("_q", _q);
618
+ dfg("_r", _r);
619
+ dfg("_s", _s);
620
+ dfg("_t", _t);
621
+ dfg("_u", _u);
622
+ dfg("_v", _v);
623
+ dfg("_w", _w);
624
+ dfg("_x", _x);
625
+ dfg("_y", _y);
626
+ dfg("_z", _z);
627
+
628
+ dfg("_A", _A);
629
+ dfg("_B", _B);
630
+ dfg("_C", _C);
631
+ dfg("_D", _D);
632
+ dfg("_E", _E);
633
+ dfg("_F", _F);
634
+ dfg("_G", _G);
635
+ dfg("_H", _H);
636
+ dfg("_I", _I);
637
+ dfg("_J", _J);
638
+ dfg("_K", _K);
639
+ dfg("_L", _L);
640
+ dfg("_M", _M);
641
+ dfg("_N", _N);
642
+ dfg("_O", _O);
643
+ dfg("_P", _P);
644
+ dfg("_Q", _Q);
645
+ dfg("_R", _R);
646
+ dfg("_S", _S);
647
+ dfg("_T", _T);
648
+ dfg("_U", _U);
649
+ dfg("_V", _V);
650
+ dfg("_W", _W);
651
+ dfg("_X", _X);
652
+ dfg("_Y", _Y);
653
+ dfg("_Z", _Z);
654
+
655
+
656
+ dfg("lr", lr);
657
+ dfg("rr", rr);
658
+ dfg("lc", lc);
659
+ dfg("rc", rc);
660
+ dfg("ls", ls);
661
+ dfg("rs", rs);
662
+ dfg("lt", lt);
663
+ dfg("gt", gt);
664
+ dfg("ab", ab);
665
+ dfg("cb", cb);
666
+ dfg("ti", ti);
667
+ dfg("ep", ep);
668
+ dfg("em", em);
669
+ dfg("at", at);
670
+ dfg("ds", ds);
671
+ dfg("ms", ms);
672
+ dfg("ps", ps);
673
+ dfg("cf", cf);
674
+ dfg("ak", ak);
675
+ dfg("mp", mp);
676
+ dfg("ad", ad);
677
+ dfg("add", add);
678
+ dfg("hp", hp);
679
+ dfg("sr", sr);
680
+ dfg("srr", srr);
681
+ dfg("us", us);
682
+ dfg("eq", eq);
683
+ dfg("vl", vl);
684
+ dfg("bs", bs);
685
+ dfg("ss", ss);
686
+ dfg("dv", dv);
687
+ dfg("qm", qm);
688
+ dfg("nl", nl);
689
+ dfg("le", le);
690
+ dfg("ge", ge);
691
+ dfg("fa", fa);
692
+ dfg("fs", fs);
693
+ dfg("fm", fm);
694
+ dfg("fd", fd);
695
+ dfg("sq", sq);
696
+ dfg("dq", dq);
697
+ dfg("gv", gv);
698
+ dfg("cl", cl);
699
+ dfg("sc", sc);
700
+ dfg("cm", cm);
701
+ dfg("es", es);
702
+ dfg("l", l);
703
+ dfg("s", s);
704
+ dfg("i", i);
705
+ dfg("d", d);
706
+
707
+ dfg("cr", cr);
708
+ dfg("lf", lf);
709
+ dfg("crlf", crlf);
710
+ dfg("lfcr", lfcr);
711
+ dfg("tab", tab);
712
+
713
+ dfg("ecr", ecr);
714
+ dfg("elf", elf);
715
+ dfg("ecrlf", ecrlf);
716
+ dfg("elfcr", elfcr);
717
+ dfg("etab", etab);
718
+
719
+
720
+ dfg("U", U);
721
+ dfg("N", N);
722
+ dfg("T", T);
723
+ dfg("F", F);
724
+
725
+ dfg("u", u);
726
+ dfg("n", n);
727
+ dfg("t", t);
728
+ dfg("f", f);
729
+
730
+ dfg("eoo", eoo);
731
+ dfg("eoa", eoa);
732
+
733
+ dfg("FNC", FNC);
734
+ dfg("BLE", BLE);
735
+ dfg("STR", STR);
736
+ dfg("SYM", SYM);
737
+ dfg("NUM", NUM);
738
+ dfg("BIG", BIG);
739
+ dfg("OBJ", OBJ);
740
+
741
+ dfg("fun", fun);
742
+ dfg("ble", ble);
743
+ dfg("str", str);
744
+ dfg("sym", sym);
745
+ dfg("num", num);
746
+ dfg("big", big);
747
+ dfg("obj", obj);
748
+
749
+ dfg("FN", FN);
750
+ dfg("BL", BL);
751
+ dfg("ST", ST);
752
+ dfg("SY", SY);
753
+ dfg("NO", NO);
754
+ dfg("BI", BI);
755
+ dfg("OJ", OJ);
756
+
757
+ dfg("fn", fn);
758
+ dfg("bl", bl);
759
+ dfg("sg", sg);
760
+ dfg("sl", sl);
761
+ dfg("no", no);
762
+ dfg("bi", bi);
763
+ dfg("oj", oj);
764
+
765
+
766
+ dfg("DT", DT);
767
+
768
+ dfg("RA", RA);
769
+ dfg("SA", SA);
770
+ dfg("MA", MA);
771
+
772
+ dfg("dt", dt);
773
+
774
+ dfg("ra", ra);
775
+ dfg("sa", sa);
776
+ dfg("ma", ma);
777
+
778
+
779
+ dfg("def", def);
780
+ dfg("fin", fin);
781
+
782
+
783
+ dfg("x", x);
784
+
785
+
786
+ dfg("ifx", ifx);
787
+ dfg("itx", itx);
788
+
789
+ dfg("ifr", ifr);
790
+
791
+ dfg("roen", roen);
792
+ dfg("roes", roes);
793
+ dfg("roea", roea);
794
+ dfg("roeo", roeo);
577
795
 
578
- // Regex builder alias
579
- dfg("rx", (regex, flags) => new RegExp(regex, flags));
580
- dfg("reg", _gb.rx);
581
- dfg("ri", regex => new RegExp(regex, "i"));
582
- dfg("rg", regex => new RegExp(regex, "g"));
583
- dfg("rm", regex => new RegExp(regex, "m"));
584
- dfg("rig", regex => new RegExp(regex, "ig"));
585
- dfg("rim", regex => new RegExp(regex, "im"));
586
- dfg("rgm", regex => new RegExp(regex, "gm"));
587
- dfg("rigm", regex => new RegExp(regex, "igm"));
796
+ dfg("val", val);
797
+
798
+
799
+ dfg("f02b", f02b);
800
+ dfg("f02r", f02r);
801
+
802
+ dfg("f20", f20);
803
+ dfg("f21", f21);
804
+
805
+ dfg("ff", ff);
806
+ dfg("fb", fb);
807
+
808
+ dfg("fi", fi);
809
+ dfg("fiv", fiv);
810
+
811
+ dfg("fo", fo);
812
+ dfg("fkv", fkv);
813
+
814
+ dfg("w", w);
815
+ dfg("dw", dw);
816
+
817
+
818
+ dfg("to", to);
819
+
820
+ dfg("tm", tm);
821
+
822
+ dfg("tu", tu);
823
+ dfg("tf", tf);
824
+ dfg("tb", tb);
825
+ dfg("ts", ts);
826
+ dfg("ty", ty);
827
+ dfg("tn", tn);
828
+ dfg("tg", tg);
829
+ dfg("tj", tj);
830
+
831
+ dfg("im", im);
832
+ dfg("io", io);
833
+ dfg("ia", ia);
834
+ dfg("ioa", ioa);
835
+ dfg("ios", ios);
836
+ dfg("ion", ion);
837
+ dfg("iot", iot);
838
+ dfg("iop", iop);
839
+
840
+ dfg("sm", sm);
841
+ dfg("df", df);
842
+
843
+ dfg("xv", xv);
844
+ dfg("nxv", nxv);
845
+ dfg("xnv", xnv);
846
+ dfg("xm", xm);
847
+ dfg("nx", nx);
848
+ dfg("xnm", xnm);
849
+
850
+ dfg("ev", ev);
851
+ dfg("nev", nev);
852
+
853
+ dfg("gtv", gtv);
854
+ dfg("ltv", ltv);
855
+ dfg("ngt", ngt);
856
+ dfg("nlt", nlt);
857
+
858
+ dfg("gev", gev);
859
+ dfg("lev", lev);
860
+ dfg("nge", nge);
861
+ dfg("nle", nle);
862
+
863
+ dfg("fc", fc);
864
+ dfg("nfc", nfc);
865
+
866
+ dfg("xu", xu);
867
+ dfg("xn", xn);
868
+ dfg("xt", xt);
869
+ dfg("xf", xf);
870
+
871
+ dfg("nxu", nxu);
872
+ dfg("nxn", nxn);
873
+ dfg("nxt", nxt);
874
+ dfg("nxf", nxf);
875
+
876
+ dfg("en", en);
877
+ dfg("et", et);
878
+ dfg("ef", ef);
879
+ dfg("ee", ee);
880
+
881
+ dfg("nn", nn);
882
+ dfg("nt", nt);
883
+ dfg("nf", nf);
884
+ dfg("ne", ne);
885
+
886
+ dfg("noe", noe);
887
+ dfg("nne", nne);
888
+
889
+
890
+ dfg("inoe", inoe);
891
+ dfg("inne", inne);
892
+
893
+
894
+ dfg("dr", dr);
895
+ dfg("drx", drx);
896
+
897
+
898
+ dfg("ok", ok);
899
+ dfg("ov", ov);
900
+ dfg("oe", oe);
901
+ dfg("oc", oc);
902
+
903
+ dfg("occ", occ);
904
+
905
+ dfg("mc", mc);
906
+ dfg("ec", ec);
907
+ dfg("xc", xc);
908
+ dfg("tc", tc);
909
+ dfg("cc", cc);
910
+ dfg("kc", kc);
911
+
912
+
913
+ dfg("cp", cp);
914
+ dfg("mk", mk);
915
+ dfg("mm", mm);
916
+ dfg("tw", tw);
917
+ dfg("cn", cn);
918
+
919
+ dfg("pc", pc);
920
+ dfg("ow", ow);
921
+ dfg("tk", tk);
922
+ dfg("aq", aq);
923
+ dfg("ih", ih);
924
+
925
+ dfg("rv", rv);
926
+
927
+
928
+ dfg("pq", pq);
929
+ dfg("pd", pd);
930
+ dfg("pp", pp);
931
+ dfg("pb", pb);
932
+ dfg("ppq", ppq);
933
+ dfg("paq", paq);
934
+ dfg("pwq", pwq);
935
+ dfg("pfq", pfq);
936
+ dfg("pfp", pfp);
937
+
938
+
939
+ dfg("dsp", dsp);
940
+ dfg("dp", dp);
941
+ dfg("dpx", dpx);
942
+ dfg("dspgs", dspgs);
943
+ dfg("dpgs", dpgs);
944
+ dfg("dpgsx", dpgsx);
945
+
946
+
947
+ dfg("rx", rx);
948
+ dfg("reg", reg);
949
+ dfg("ri", ri);
950
+ dfg("rg", rg);
951
+ dfg("rm", rm);
952
+ dfg("rig", rig);
953
+ dfg("rim", rim);
954
+ dfg("rgm", rgm);
955
+ dfg("rigm", rigm);
956
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "alienese",
3
- "version": "0.5.2",
3
+ "version": "0.6.0",
4
4
  "description": "Alienise.js - Estre javscript Alienese patch",
5
5
  "main": "alienese.js",
6
6
  "dependencies": {
7
- "modernism": "^0.5.2"
7
+ "modernism": "^0.6.0"
8
8
  },
9
9
  "scripts": {
10
10
  "test": "echo \"Error: no test specified\" && exit 1"