forked from e18e/module-replacements
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmicro-utilities.json
More file actions
901 lines (901 loc) · 33.7 KB
/
Copy pathmicro-utilities.json
File metadata and controls
901 lines (901 loc) · 33.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
{
"replacements": {
"snippet::array-coerce": {
"id": "snippet::array-coerce",
"type": "simple",
"description": "You can use a combination of a ternary operator and `Array.isArray` to make sure a value, `undefined`, `null` or an array is always returned as an array.",
"example": "(val == null ? [] : Array.isArray(val) ? val : [val])\n// Or if you need to convert an iterable into an array\nArray.from(iterable)"
},
"snippet::array-difference": {
"id": "snippet::array-difference",
"type": "simple",
"description": "You can use a combination of `filter` and `includes` to calculate the difference between two arrays.",
"example": "const difference = (a, b) => a.filter((item) => !b.includes(item))"
},
"snippet::array-flatten": {
"id": "snippet::array-flatten",
"type": "simple",
"description": "You can use `Array.prototype.flat` with `Infinity` as an argument to fully flatten an array.",
"example": "array.flat(Infinity)"
},
"snippet::array-from-count": {
"id": "snippet::array-from-count",
"type": "simple",
"description": "You can use `Array.from` to create an array of sequential integers",
"example": "Array.from({ length: n }, (_, i) => i);"
},
"snippet::array-from-count-with-start": {
"id": "snippet::array-from-count-with-start",
"type": "simple",
"description": "You can use `Array.from` to create an array of sequential integers starting from a specific integer",
"example": "Array.from({ length: end - start }, (_, i) => i + start);"
},
"snippet::array-last": {
"id": "snippet::array-last",
"type": "simple",
"description": "You can use `arr.at(-1)` if supported or `arr[arr.length - 1]` to get the last element of an array.",
"example": "const last = (arr) => arr.at(-1);\n// or in older environments\nconst lastLegacy = (arr) => arr[arr.length - 1]"
},
"snippet::array-slice-exclude-last-n": {
"id": "snippet::array-slice-exclude-last-n",
"type": "simple",
"description": "You can get all but the last n elements using `array.slice`",
"example": "array.slice(0, array.length - n)"
},
"snippet::array-union": {
"id": "snippet::array-union",
"type": "simple",
"description": "You can use a combination of the spread operator and `Set` to create a union of two arrays.",
"example": "const union = (a, b) => [...new Set([...a, ...b])]"
},
"snippet::array-unique": {
"id": "snippet::array-unique",
"type": "simple",
"description": "You can convert to and from a `Set` to remove duplicates from an array.",
"example": "const unique = (arr) => [...new Set(arr)]"
},
"snippet::async-function-constructor": {
"id": "snippet::async-function-constructor",
"type": "simple",
"description": "You can get the `AsyncFunction` using `async function`.",
"example": "const AsyncFunction = (async () => {}).constructor"
},
"snippet::base64": {
"id": "snippet::base64",
"type": "simple",
"description": "Every modern runtime provides a way to convert byte array to and from base64.",
"example": "// From base64 to Uint8Array\nconst bytes = Uint8Array.fromBase64(base64)\n// From Uint8Array to base64\nconst base64 = bytes.toBase64()"
},
"snippet::base64-id": {
"id": "snippet::base64-id",
"type": "simple",
"description": "You can use `crypto.randomBytes` with `Buffer.prototype.toString` to generate a random base64 id",
"example": "import crypto from 'node:crypto'\nconst id = crypto.randomBytes(15).toString('base64').replaceAll('+', '-').replaceAll('/', '_')"
},
"snippet::call-bind": {
"id": "snippet::call-bind",
"type": "simple",
"description": "Every modern runtime provides a way to bind to the `call` method of a function.",
"example": "const fnBound = Function.call.bind(fn)"
},
"snippet::char-last": {
"id": "snippet::char-last",
"type": "simple",
"description": "You can use `str.at(-1)` if supported or `str[str.length - 1]` to get the last character of a string.",
"example": "const last = (str) => str.at(-1);\n// or in older environments\nconst lastLegacy = (str) => str[str.length - 1]"
},
"snippet::for-own": {
"id": "snippet::for-own",
"type": "simple",
"description": "You can use `Object.keys(obj).forEach` to iterate over the own enumerable properties of an object.",
"example": "Object.keys(obj).forEach(key => {\n const value = obj[key];\n // do something\n});"
},
"snippet::get-iterator": {
"id": "snippet::get-iterator",
"type": "simple",
"description": "Every modern runtime provides a way to get the iterator function through the `Symbol.iterator` symbol.",
"example": "const iterator = obj[Symbol.iterator]?.()"
},
"snippet::has-ansi": {
"id": "snippet::has-ansi",
"type": "simple",
"description": "You can use the `includes` method on the string to check if a specific ANSI byte is present.",
"example": "string.includes(\"\\u001b\") || string.includes(\"\\u009b\")"
},
"snippet::has-argv": {
"id": "snippet::has-argv",
"type": "simple",
"description": "You can use the `includes` method on the `process.argv` array to check if a flag is present.",
"example": "process.argv.includes('--flag')"
},
"snippet::is-arguments": {
"id": "snippet::is-arguments",
"type": "simple",
"description": "You can use `Object.prototype.toString.call(obj) === \"[object Arguments]\"`",
"example": "const isArguments = (val) => Object.prototype.toString.call(val) === \"[object Arguments]\";"
},
"snippet::is-arraybuffer": {
"id": "snippet::is-arraybuffer",
"type": "simple",
"description": "You can use `instanceof ArrayBuffer`, or if cross-realm, use `Object.prototype.toString.call(obj) === \"[object ArrayBuffer]\"`",
"example": "const isArrayBuffer = obj instanceof ArrayBuffer;\n// for cross-realm\nconst isArrayBufferCrossRealm = Object.prototype.toString.call(obj) === \"[object ArrayBuffer]\""
},
"snippet::is-async-function": {
"id": "snippet::is-async-function",
"type": "simple",
"description": "You can use `typeof` and `Object.prototype.toString.call` to check if it's an async function",
"example": "const isAsyncFunction = (obj) => typeof obj === \"function\" && Object.prototype.toString.call(obj) === \"[object AsyncFunction]\""
},
"snippet::is-bigint": {
"id": "snippet::is-bigint",
"type": "simple",
"description": "You can use `typeof` to check if a value is a bigint.",
"example": "const isString = (value) => typeof value === \"bigint\";"
},
"snippet::is-boolean": {
"id": "snippet::is-boolean",
"type": "simple",
"description": "You can use `typeof` to check if a value is a boolean primitive, and `Object.prototype.toString.call` to check if it's a `Boolean` object.",
"example": "Object.prototype.toString.call(v) === \"[object Boolean]\""
},
"snippet::is-ci": {
"id": "snippet::is-ci",
"type": "simple",
"description": "Every major CI provider sets a `CI` environment variable that you can use to detect if you're running in a CI environment.",
"example": "Boolean(process.env.CI)"
},
"snippet::is-date": {
"id": "snippet::is-date",
"type": "simple",
"description": "You can use `instanceof Date`, or if cross-realm, use `Object.prototype.toString.call(v) === \"[object Date]\"`",
"example": "const isDate = v instanceof Date;\n// for cross-realm\nconst isDateCrossRealm = Object.prototype.toString.call(v) === \"[object Date]\""
},
"snippet::is-deflate-buffer": {
"id": "snippet::is-deflate-buffer",
"type": "simple",
"description": "You can check the first two bytes of a buffer to detect if it's compressed using deflate.",
"example": "function isDeflate(buf) {\n if (buf.length < 2 || buf[0] !== 0x78) return false;\n const b = buf[1];\n return b === 1 || b === 0x9c || b === 0xda;\n}"
},
"snippet::is-electron": {
"id": "snippet::is-electron",
"type": "simple",
"description": "You can detect Electron by checking the renderer process type, `process.versions.electron`, or the user agent.",
"example": "function isElectron() {\n return Boolean(\n globalThis.window?.process?.type === \"renderer\" ||\n globalThis.process?.versions?.electron ||\n globalThis.navigator?.userAgent?.includes(\"Electron\")\n );\n}"
},
"snippet::is-equal": {
"id": "snippet::is-equal",
"type": "simple",
"description": "You can determine if two values are equal using regular equality checks.",
"example": "a === b"
},
"snippet::is-even": {
"id": "snippet::is-even",
"type": "simple",
"description": "You can use the modulo operator to check if a number is even.",
"example": "(n % 2) === 0"
},
"snippet::is-function": {
"id": "snippet::is-function",
"type": "simple",
"description": "You can use `typeof` to check if a value is a function.",
"example": "typeof value === \"function\""
},
"snippet::is-generator-function": {
"id": "snippet::is-generator-function",
"type": "simple",
"description": "You can use `typeof` and `Object.prototype.toString.call` to check if a value is a generator function",
"example": "const isGeneratorFunction = (obj) => typeof obj === \"function\" && Object.prototype.toString.call(obj) === \"[object GeneratorFunction]\""
},
"snippet::is-gzip-buffer": {
"id": "snippet::is-gzip-buffer",
"type": "simple",
"description": "You can check first three bytes of a buffer to detect if it is a gzip file.",
"example": "function isGzip(buf) {\n if (buf.length < 3) return false;\n return buf[0] === 31 && buf[1] === 139 && buf[2] === 8;\n}"
},
"snippet::is-in-ssh": {
"id": "snippet::is-in-ssh",
"type": "simple",
"description": "You can check if the current environment is SSH by checking if the `SSH_CONNECTION` environment variable is set.",
"example": "const isInSsh = Boolean(process.env.SSH_CONNECTION);"
},
"snippet::is-negative": {
"id": "snippet::is-negative",
"type": "simple",
"description": "You can check if a number is less than 0 to determine if it's negative.",
"example": "(n) => n < 0"
},
"snippet::is-negative-zero": {
"id": "snippet::is-negative-zero",
"type": "simple",
"description": "You can use `Object.is` to check if a value is negative zero.",
"example": "Object.is(n, -0)"
},
"snippet::is-npm": {
"id": "snippet::is-npm",
"type": "simple",
"description": "If the current environment is npm the `npm_config_user_agent` environment variable will be set and start with `\"npm\"`.",
"example": "const isNpm = process.env.npm_config_user_agent?.startsWith(\"npm\")"
},
"snippet::is-null": {
"id": "snippet::is-null",
"type": "simple",
"description": "You can check if a value is `null` using regular equality checks.",
"example": "value === null"
},
"snippet::is-number": {
"id": "snippet::is-number",
"type": "simple",
"description": "You can check if a value is a number by using `typeof` or coercing it to a number and using `Number.isFinite`.",
"example": "const isNumber = (v) => typeof v === \"number\" || (typeof v === \"string\" && Number.isFinite(+v));"
},
"snippet::is-object": {
"id": "snippet::is-object",
"type": "simple",
"description": "You can use `typeof` to check if a value is an object and `Object.getPrototypeOf` to ensure it's a plain object.",
"example": "const isObject = (obj) => obj && typeof obj === \"object\" && (Object.getPrototypeOf(obj) === null || Object.getPrototypeOf(obj) === Object.prototype);"
},
"snippet::is-object-or-function": {
"id": "snippet::is-object-or-function",
"type": "simple",
"description": "You can use `typeof` to check if a value is an object or a function.",
"example": "const isObjectOrFunction = (v) => v !== null && (typeof v === \"object\" || typeof v === \"function\");"
},
"snippet::is-odd": {
"id": "snippet::is-odd",
"type": "simple",
"description": "You can use the modulo operator to check if a number is odd.",
"example": "(n % 2) === 1"
},
"snippet::is-primitve": {
"id": "snippet::is-primitve",
"type": "simple",
"description": "You can check `typeof` of a value to determine if it's a primitive. Note that `typeof null` is `\"object\"` so you need to check for `null` separately.",
"example": "const isPrimitive = (value) => value === null || (typeof value !== \"function\" && typeof value !== \"object\");"
},
"snippet::is-regexp": {
"id": "snippet::is-regexp",
"type": "simple",
"description": "You can use `instanceof RegExp` to check if a value is a regular expression, or if cross-realm, use `Object.prototype.toString.call(v) === \"[object RegExp]\"`.",
"example": "const isRegExp = (v) => v instanceof RegExp;\n// for cross-realm\nconst isRegExpCrossRealm = Object.prototype.toString.call(v) === \"[object RegExp]\";"
},
"snippet::is-set": {
"id": "snippet::is-set",
"type": "simple",
"description": "You can use `instanceof Set` to check if a value is a `Set`, or if cross-realm, use `Object.prototype.toString.call(v) === \"[object Set]\"`",
"example": "const isSet = v instanceof Set;\n// for cross-realm\nconst isSetCrossRealm = Object.prototype.toString.call(v) === \"[object Set]\""
},
"snippet::is-stream": {
"id": "snippet::is-stream",
"type": "simple",
"description": "`node:stream` provides `isReadable` and `isWritable` methods that can be used to check if a stream is readable or writable.",
"example": "import { isReadable, isWritable } from 'node:stream';\nconst isStream = (stream) => isReadable(stream) || isWritable(stream);"
},
"snippet::is-string": {
"id": "snippet::is-string",
"type": "simple",
"description": "You can use `typeof` to check if a value is a string.",
"example": "const isString = (value) => typeof value === \"string\";"
},
"snippet::is-symbol": {
"id": "snippet::is-symbol",
"type": "simple",
"description": "You can use `typeof` to check if a value is a symbol.",
"example": "const isSymbol = (value) => typeof value === \"symbol\";"
},
"snippet::is-travis": {
"id": "snippet::is-travis",
"type": "simple",
"description": "You can check if the current environment is Travis CI by checking if the `TRAVIS` environment variable is set.",
"example": "const isTravis = () => \"TRAVIS\" in process.env;"
},
"snippet::is-undefined": {
"id": "snippet::is-undefined",
"type": "simple",
"description": "You can use `typeof` to check if a value is `undefined`.",
"example": "typeof value === \"undefined\";"
},
"snippet::is-whitespace": {
"id": "snippet::is-whitespace",
"type": "simple",
"description": "You can check if a string contains only whitespace with RegExp or by trimming it and comparing it to an empty string.",
"example": "const isWhitespace = (str) => /^\\s*$/.test(str);"
},
"snippet::is-windows": {
"id": "snippet::is-windows",
"type": "simple",
"description": "You can check if the current environment is Windows by checking if `process.platform` is equal to \"win32\".",
"example": "const isWindows = () => process.platform === \"win32\";"
},
"snippet::is-wsl": {
"id": "snippet::is-wsl",
"type": "simple",
"description": "You can check if the current environment is WSL by checking if the `WSL_DISTRO_NAME` environment variable is set.",
"example": "const isWsl = Boolean(process.env.WSL_DISTRO_NAME);"
},
"snippet::json-file": {
"id": "snippet::json-file",
"type": "simple",
"description": "You can use `JSON` and `node:fs` to read and write JSON files.",
"example": "import * as fs from 'node:fs/promises'\nfs.readFile(file, 'utf8').then(JSON.parse)\nfs.writeFile(file, JSON.stringify(data, null, 2) + '\\n')"
},
"snippet::math-random": {
"id": "snippet::math-random",
"type": "simple",
"description": "You can use `Math.random()` or `crypto.getRandomValues` if cryptographic randomness is required.",
"example": "crypto.getRandomValues(new Uint32Array(1))[0] / (2 ** 32);\n// or\nMath.random();"
},
"snippet::noop": {
"id": "snippet::noop",
"type": "simple",
"description": "You can use an arrow function `() => {}` for a noop function.",
"example": "const noop = () => {}"
},
"snippet::object-exclude": {
"id": "snippet::object-exclude",
"type": "simple",
"description": "You can use `Object.fromEntries` with `Object.entries` and `Array.prototype.filter` to exclude specific keys from an object.",
"example": "const objectExclude = (obj, keys) => Object.fromEntries(Object.entries(obj).filter(([k]) => !keys.includes(k)));"
},
"snippet::object-filter": {
"id": "snippet::object-filter",
"type": "simple",
"description": "You can use `Object.fromEntries` with `Object.entries` and `Array.prototype.filter` to filter an object's properties.",
"example": "const objectFilter = (obj, fn) => Object.fromEntries(Object.entries(obj).filter(fn));"
},
"snippet::object-map": {
"id": "snippet::object-map",
"type": "simple",
"description": "You can use `Object.fromEntries` with `Object.entries` and `Array.prototype.map` to map an object's properties.",
"example": "const objectMap = (obj, fn) => Object.fromEntries(Object.entries(obj).map(([k, v]) => fn(k, v)));"
},
"snippet::object-reduce": {
"id": "snippet::object-reduce",
"type": "simple",
"description": "You can use `Object.entries` and `Array.prototype.reduce`.",
"example": "const objectReduce = (obj, fn, initial) => Object.entries(obj).reduce((acc, [k, v]) => fn(acc, k, v), initial);"
},
"snippet::path-key": {
"id": "snippet::path-key",
"type": "simple",
"description": "You can use `Object.keys` with `Array.prototype.findLast` to find the case-insensitive `PATH` environment variable key.",
"example": "const pathKey = Object.keys(process.env).findLast((k) => k.toUpperCase() === 'PATH') ?? 'PATH';"
},
"snippet::regexp-copy": {
"id": "snippet::regexp-copy",
"type": "simple",
"description": "You can create a copy of a regular expression using the `RegExp` constructor.",
"example": "const copyRegExp = (regexp) => new RegExp(regexp);"
},
"snippet::set-tostringtag": {
"id": "snippet::set-tostringtag",
"type": "simple",
"description": "You can set the `toStringTag` of an object using `Object.defineProperty`.",
"example": "const setToStringTag = (target, value) => Object.defineProperty(target, Symbol.toStringTag, { value, configurable: true });"
},
"snippet::shebang-regex": {
"id": "snippet::shebang-regex",
"type": "simple",
"description": "You can use `/^#!(.+)/` regex.",
"example": "const shebangRegex = /^#!(.+)/;"
},
"snippet::split-lines": {
"id": "snippet::split-lines",
"type": "simple",
"description": "You can split a string into lines using a regular expression.",
"example": "const splitLines = (str) => str.split(/\\r?\\n/);"
},
"snippet::strip-bom": {
"id": "snippet::strip-bom",
"type": "simple",
"description": "You can check if the first character of the string is the BOM and strip it using `String.prototype.slice` if it is.",
"example": "str.charCodeAt(0) === 0xFEFF ? str.slice(1) : str;"
},
"snippet::to-lower": {
"id": "snippet::to-lower",
"type": "simple",
"description": "You can convert a string to lowercase using `toLocaleLowerCase` or `toLowerCase`.",
"example": "const toLower = (str) => str.toLocaleLowerCase();"
},
"snippet::to-uppercase": {
"id": "snippet::to-uppercase",
"type": "simple",
"description": "You can convert a string to uppercase using `toLocaleUpperCase` or `toUpperCase`.",
"example": "const toUpper = (str) => str.toLocaleUpperCase();"
},
"snippet::typeof": {
"id": "snippet::typeof",
"type": "simple",
"description": "You can use `typeof` to get the type of a value, or `Object.prototype.toString.call` to get the internal [[Class]] of an object.",
"example": "const typeOf = (value) => typeof value;\n// for more specific types\nconst classOf = (value) => Object.prototype.toString.call(value);"
},
"snippet::unix-paths": {
"id": "snippet::unix-paths",
"type": "simple",
"description": "You can check the start of a path for the Windows extended-length path prefix and if it's not present, replace backslashes with forward slashes.",
"example": "path.startsWith('\\\\\\\\?\\\\') ? path : path.replace(/\\\\/g, '/')"
},
"snippet::year": {
"id": "snippet::year",
"type": "simple",
"description": "You can use `new Date().getUTCFullYear()` to get the current year.",
"example": "new Date().getUTCFullYear()"
}
},
"mappings": {
"arr-diff": {
"type": "module",
"moduleName": "arr-diff",
"replacements": ["snippet::array-difference"]
},
"arr-flatten": {
"type": "module",
"moduleName": "arr-flatten",
"replacements": ["snippet::array-flatten"]
},
"array-back": {
"type": "module",
"moduleName": "array-back",
"replacements": ["snippet::array-coerce"]
},
"array-ify": {
"type": "module",
"moduleName": "array-ify",
"replacements": ["snippet::array-coerce"]
},
"array-initial": {
"type": "module",
"moduleName": "array-initial",
"replacements": ["snippet::array-slice-exclude-last-n"]
},
"array-last": {
"type": "module",
"moduleName": "array-last",
"replacements": ["snippet::array-last"]
},
"array-range": {
"type": "module",
"moduleName": "array-range",
"replacements": ["snippet::array-from-count-with-start"]
},
"array-union": {
"type": "module",
"moduleName": "array-union",
"replacements": ["snippet::array-union"]
},
"array-uniq": {
"type": "module",
"moduleName": "array-uniq",
"replacements": ["snippet::array-unique"]
},
"array-unique": {
"type": "module",
"moduleName": "array-unique",
"replacements": ["snippet::array-unique"]
},
"arrify": {
"type": "module",
"moduleName": "arrify",
"replacements": ["snippet::array-coerce"]
},
"as-array": {
"type": "module",
"moduleName": "as-array",
"replacements": ["snippet::array-coerce"]
},
"async-function": {
"type": "module",
"moduleName": "async-function",
"replacements": ["snippet::async-function-constructor"]
},
"base64-js": {
"type": "module",
"moduleName": "base64-js",
"replacements": ["snippet::base64"]
},
"base64id": {
"type": "module",
"moduleName": "base64id",
"replacements": ["snippet::base64-id"]
},
"call-bind": {
"type": "module",
"moduleName": "call-bind",
"replacements": ["snippet::call-bind"]
},
"clone-regexp": {
"type": "module",
"moduleName": "clone-regexp",
"replacements": ["snippet::regexp-copy"]
},
"es-get-iterator": {
"type": "module",
"moduleName": "es-get-iterator",
"replacements": ["snippet::get-iterator"]
},
"es-set-tostringtag": {
"type": "module",
"moduleName": "es-set-tostringtag",
"replacements": ["snippet::set-tostringtag"]
},
"except": {
"type": "module",
"moduleName": "except",
"replacements": ["snippet::object-exclude"]
},
"filter-obj": {
"type": "module",
"moduleName": "filter-obj",
"replacements": ["snippet::object-filter"]
},
"for-own": {
"type": "module",
"moduleName": "for-own",
"replacements": ["snippet::for-own"]
},
"has-ansi": {
"type": "module",
"moduleName": "has-ansi",
"replacements": ["snippet::has-ansi"]
},
"has-flag": {
"type": "module",
"moduleName": "has-flag",
"replacements": ["snippet::has-argv"]
},
"iota-array": {
"type": "module",
"moduleName": "iota-array",
"replacements": ["snippet::array-from-count"]
},
"is-arguments": {
"type": "module",
"moduleName": "is-arguments",
"replacements": ["snippet::is-arguments"]
},
"is-array-buffer": {
"type": "module",
"moduleName": "is-array-buffer",
"replacements": ["snippet::is-arraybuffer"]
},
"is-async-function": {
"type": "module",
"moduleName": "is-async-function",
"replacements": ["snippet::is-async-function"]
},
"is-bigint": {
"type": "module",
"moduleName": "is-bigint",
"replacements": ["snippet::is-bigint"]
},
"is-boolean-object": {
"type": "module",
"moduleName": "is-boolean-object",
"replacements": ["snippet::is-boolean"]
},
"is-ci": {
"type": "module",
"moduleName": "is-ci",
"replacements": ["snippet::is-ci"]
},
"is-date-object": {
"type": "module",
"moduleName": "is-date-object",
"replacements": ["snippet::is-date"]
},
"is-deflate": {
"type": "module",
"moduleName": "is-deflate",
"replacements": ["snippet::is-deflate-buffer"]
},
"is-electron": {
"type": "module",
"moduleName": "is-electron",
"replacements": ["snippet::is-electron"]
},
"is-even": {
"type": "module",
"moduleName": "is-even",
"replacements": ["snippet::is-even"]
},
"is-generator-function": {
"type": "module",
"moduleName": "is-generator-function",
"replacements": ["snippet::is-generator-function"]
},
"is-gzip": {
"type": "module",
"moduleName": "is-gzip",
"replacements": ["snippet::is-gzip-buffer"]
},
"is-in-ci": {
"type": "module",
"moduleName": "is-in-ci",
"replacements": ["snippet::is-ci"]
},
"is-in-ssh": {
"type": "module",
"moduleName": "is-in-ssh",
"replacements": ["snippet::is-in-ssh"]
},
"is-negative": {
"type": "module",
"moduleName": "is-negative",
"replacements": ["snippet::is-negative"]
},
"is-negative-zero": {
"type": "module",
"moduleName": "is-negative-zero",
"replacements": ["snippet::is-negative-zero"]
},
"is-npm": {
"type": "module",
"moduleName": "is-npm",
"replacements": ["snippet::is-npm"]
},
"is-number": {
"type": "module",
"moduleName": "is-number",
"replacements": ["snippet::is-number"]
},
"is-number-object": {
"type": "module",
"moduleName": "is-number-object",
"replacements": ["snippet::is-number"]
},
"is-obj": {
"type": "module",
"moduleName": "is-obj",
"replacements": ["snippet::is-object-or-function"]
},
"is-object": {
"type": "module",
"moduleName": "is-object",
"replacements": ["snippet::is-object"]
},
"is-odd": {
"type": "module",
"moduleName": "is-odd",
"replacements": ["snippet::is-odd"]
},
"is-plain-obj": {
"type": "module",
"moduleName": "is-plain-obj",
"replacements": ["snippet::is-object"]
},
"is-plain-object": {
"type": "module",
"moduleName": "is-plain-object",
"replacements": ["snippet::is-object"]
},
"is-primitive": {
"type": "module",
"moduleName": "is-primitive",
"replacements": ["snippet::is-primitve"]
},
"is-regex": {
"type": "module",
"moduleName": "is-regex",
"replacements": ["snippet::is-regexp"]
},
"is-regexp": {
"type": "module",
"moduleName": "is-regexp",
"replacements": ["snippet::is-regexp"]
},
"is-set": {
"type": "module",
"moduleName": "is-set",
"replacements": ["snippet::is-set"]
},
"is-stream": {
"type": "module",
"moduleName": "is-stream",
"replacements": ["snippet::is-stream"]
},
"is-string": {
"type": "module",
"moduleName": "is-string",
"replacements": ["snippet::is-string"]
},
"is-symbol": {
"type": "module",
"moduleName": "is-symbol",
"replacements": ["snippet::is-symbol"]
},
"is-travis": {
"type": "module",
"moduleName": "is-travis",
"replacements": ["snippet::is-travis"]
},
"is-whitespace": {
"type": "module",
"moduleName": "is-whitespace",
"replacements": ["snippet::is-whitespace"]
},
"is-windows": {
"type": "module",
"moduleName": "is-windows",
"replacements": ["snippet::is-windows"]
},
"is-wsl": {
"type": "module",
"moduleName": "is-wsl",
"replacements": ["snippet::is-wsl"]
},
"isobject": {
"type": "module",
"moduleName": "isobject",
"replacements": ["snippet::is-object"]
},
"isstream": {
"type": "module",
"moduleName": "isstream",
"replacements": ["snippet::is-stream"]
},
"js-base64": {
"type": "module",
"moduleName": "js-base64",
"replacements": ["snippet::base64"]
},
"jsonfile": {
"type": "module",
"moduleName": "jsonfile",
"replacements": ["snippet::json-file"]
},
"kind-of": {
"type": "module",
"moduleName": "kind-of",
"replacements": ["snippet::typeof"]
},
"last-char": {
"type": "module",
"moduleName": "last-char",
"replacements": ["snippet::char-last"]
},
"lodash.castarray": {
"type": "module",
"moduleName": "lodash.castarray",
"replacements": ["snippet::array-coerce"]
},
"lodash.eq": {
"type": "module",
"moduleName": "lodash.eq",
"replacements": ["snippet::is-equal"]
},
"lodash.isboolean": {
"type": "module",
"moduleName": "lodash.isboolean",
"replacements": ["snippet::is-boolean"]
},
"lodash.isfunction": {
"type": "module",
"moduleName": "lodash.isfunction",
"replacements": ["snippet::is-function"]
},
"lodash.isnull": {
"type": "module",
"moduleName": "lodash.isnull",
"replacements": ["snippet::is-null"]
},
"lodash.isnumber": {
"type": "module",
"moduleName": "lodash.isnumber",
"replacements": ["snippet::is-number"]
},
"lodash.isobject": {
"type": "module",
"moduleName": "lodash.isobject",
"replacements": ["snippet::is-object"]
},
"lodash.isplainobject": {
"type": "module",
"moduleName": "lodash.isplainobject",
"replacements": ["snippet::is-object"]
},
"lodash.isregexp": {
"type": "module",
"moduleName": "lodash.isregexp",
"replacements": ["snippet::is-regexp"]
},
"lodash.isstring": {
"type": "module",
"moduleName": "lodash.isstring",
"replacements": ["snippet::is-string"]
},
"lodash.issymbol": {
"type": "module",
"moduleName": "lodash.issymbol",
"replacements": ["snippet::is-symbol"]
},
"lodash.isundefined": {
"type": "module",
"moduleName": "lodash.isundefined",
"replacements": ["snippet::is-undefined"]
},
"lodash.noop": {
"type": "module",
"moduleName": "lodash.noop",
"replacements": ["snippet::noop"]
},
"lower-case": {
"type": "module",
"moduleName": "lower-case",
"replacements": ["snippet::to-lower"]
},
"map-obj": {
"type": "module",
"moduleName": "map-obj",
"replacements": ["snippet::object-map"]
},
"math-random": {
"type": "module",
"moduleName": "math-random",
"replacements": ["snippet::math-random"]
},
"object.map": {
"type": "module",
"moduleName": "object.map",
"replacements": ["snippet::object-map"]
},
"object.reduce": {
"type": "module",
"moduleName": "object.reduce",
"replacements": ["snippet::object-reduce"]
},
"path-key": {
"type": "module",
"moduleName": "path-key",
"replacements": ["snippet::path-key"]
},
"shebang-regex": {
"type": "module",
"moduleName": "shebang-regex",
"replacements": ["snippet::shebang-regex"]
},
"slash": {
"type": "module",
"moduleName": "slash",
"replacements": ["snippet::unix-paths"]
},
"split-lines": {
"type": "module",
"moduleName": "split-lines",
"replacements": ["snippet::split-lines"]
},
"strip-bom": {
"type": "module",
"moduleName": "strip-bom",
"replacements": ["snippet::strip-bom"]
},
"strip-bom-string": {
"type": "module",
"moduleName": "strip-bom-string",
"replacements": ["snippet::strip-bom"]
},
"toarray": {
"type": "module",
"moduleName": "toarray",
"replacements": ["snippet::array-coerce"]
},
"uniq": {
"type": "module",
"moduleName": "uniq",
"replacements": ["snippet::array-unique"]
},
"upper-case": {
"type": "module",
"moduleName": "upper-case",
"replacements": ["snippet::to-uppercase"]
},
"validate.io-function": {
"type": "module",
"moduleName": "validate.io-function",
"replacements": ["snippet::is-function"]
},
"year": {
"type": "module",
"moduleName": "year",
"replacements": ["snippet::year"]
}
}
}