@e280/stz 0.0.0-2 → 0.0.0-20

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 (115) hide show
  1. package/{readme.md → README.md} +42 -6
  2. package/package.json +8 -5
  3. package/s/clone/clone.test.ts +123 -123
  4. package/s/coalesce.ts +6 -0
  5. package/s/data/bytename/bytename.test.ts +49 -0
  6. package/s/data/{barname/barname.ts → bytename/bytename.ts} +38 -10
  7. package/s/data/bytename/index.ts +4 -0
  8. package/s/data/bytename/thumbprint.test.ts +53 -0
  9. package/s/data/bytename/thumbprint.ts +112 -0
  10. package/s/data/bytes.ts +10 -0
  11. package/s/deadline.ts +7 -4
  12. package/s/debounce/debounce.test.ts +73 -73
  13. package/s/deep/deep.test.ts +8 -8
  14. package/s/deep/parts/equal.test.ts +123 -124
  15. package/s/{defer-promise.ts → defer.ts} +2 -2
  16. package/s/drill.ts +20 -0
  17. package/s/id-counter.ts +9 -0
  18. package/s/index.ts +11 -2
  19. package/s/is.ts +10 -4
  20. package/s/loopy.ts +12 -0
  21. package/s/map-g.ts +2 -2
  22. package/s/nap.ts +1 -0
  23. package/s/pubsub.ts +20 -2
  24. package/s/tests.test.ts +17 -0
  25. package/x/clone/clone.test.d.ts +15 -1
  26. package/x/clone/clone.test.js +106 -124
  27. package/x/clone/clone.test.js.map +1 -1
  28. package/x/coalesce.d.ts +2 -0
  29. package/x/coalesce.js +5 -0
  30. package/x/coalesce.js.map +1 -0
  31. package/x/data/bytename/bytename.d.ts +19 -0
  32. package/x/data/{barname/barname.js → bytename/bytename.js} +27 -11
  33. package/x/data/bytename/bytename.js.map +1 -0
  34. package/x/data/bytename/bytename.test.d.ts +17 -0
  35. package/x/data/bytename/bytename.test.js +41 -0
  36. package/x/data/bytename/bytename.test.js.map +1 -0
  37. package/x/data/bytename/index.d.ts +2 -0
  38. package/x/data/bytename/index.js +3 -0
  39. package/x/data/bytename/index.js.map +1 -0
  40. package/x/data/bytename/thumbprint.d.ts +36 -0
  41. package/x/data/bytename/thumbprint.js +79 -0
  42. package/x/data/bytename/thumbprint.js.map +1 -0
  43. package/x/data/bytename/thumbprint.test.d.ts +24 -0
  44. package/x/data/bytename/thumbprint.test.js +45 -0
  45. package/x/data/bytename/thumbprint.test.js.map +1 -0
  46. package/x/data/bytename/utils/prefixes.js.map +1 -0
  47. package/x/data/bytename/utils/suffixes.js.map +1 -0
  48. package/x/data/bytes.d.ts +1 -0
  49. package/x/data/bytes.js +9 -0
  50. package/x/data/bytes.js.map +1 -1
  51. package/x/deadline.d.ts +3 -2
  52. package/x/deadline.js +8 -4
  53. package/x/deadline.js.map +1 -1
  54. package/x/debounce/debounce.test.d.ts +8 -1
  55. package/x/debounce/debounce.test.js +70 -74
  56. package/x/debounce/debounce.test.js.map +1 -1
  57. package/x/deep/deep.test.d.ts +21 -1
  58. package/x/deep/deep.test.js +5 -9
  59. package/x/deep/deep.test.js.map +1 -1
  60. package/x/deep/parts/equal.test.d.ts +19 -1
  61. package/x/deep/parts/equal.test.js +107 -125
  62. package/x/deep/parts/equal.test.js.map +1 -1
  63. package/x/{defer-promise.d.ts → defer.d.ts} +2 -2
  64. package/x/{defer-promise.js → defer.js} +2 -2
  65. package/x/defer.js.map +1 -0
  66. package/x/drill.d.ts +4 -0
  67. package/x/drill.js +12 -0
  68. package/x/drill.js.map +1 -0
  69. package/x/id-counter.d.ts +5 -0
  70. package/x/id-counter.js +10 -0
  71. package/x/id-counter.js.map +1 -0
  72. package/x/index.d.ts +9 -2
  73. package/x/index.js +9 -2
  74. package/x/index.js.map +1 -1
  75. package/x/is.d.ts +6 -4
  76. package/x/is.js +6 -4
  77. package/x/is.js.map +1 -1
  78. package/x/loopy.d.ts +2 -0
  79. package/x/loopy.js +10 -0
  80. package/x/loopy.js.map +1 -0
  81. package/x/map-g.d.ts +3 -3
  82. package/x/map-g.js +1 -1
  83. package/x/map-g.js.map +1 -1
  84. package/x/nap.d.ts +1 -0
  85. package/x/nap.js +1 -0
  86. package/x/nap.js.map +1 -1
  87. package/x/pubsub.d.ts +11 -0
  88. package/x/pubsub.js +4 -2
  89. package/x/pubsub.js.map +1 -1
  90. package/x/tests.test.js +14 -0
  91. package/x/tests.test.js.map +1 -0
  92. package/s/data/barname/badge.ts +0 -78
  93. package/s/data/barname/demo.ts +0 -49
  94. package/s/data/barname/index.ts +0 -4
  95. package/x/data/barname/badge.d.ts +0 -25
  96. package/x/data/barname/badge.js +0 -64
  97. package/x/data/barname/badge.js.map +0 -1
  98. package/x/data/barname/barname.d.ts +0 -7
  99. package/x/data/barname/barname.js.map +0 -1
  100. package/x/data/barname/demo.js +0 -45
  101. package/x/data/barname/demo.js.map +0 -1
  102. package/x/data/barname/index.d.ts +0 -2
  103. package/x/data/barname/index.js +0 -3
  104. package/x/data/barname/index.js.map +0 -1
  105. package/x/data/barname/utils/prefixes.js.map +0 -1
  106. package/x/data/barname/utils/suffixes.js.map +0 -1
  107. package/x/defer-promise.js.map +0 -1
  108. /package/{license → LICENSE} +0 -0
  109. /package/s/data/{barname → bytename}/utils/prefixes.ts +0 -0
  110. /package/s/data/{barname → bytename}/utils/suffixes.ts +0 -0
  111. /package/x/data/{barname → bytename}/utils/prefixes.d.ts +0 -0
  112. /package/x/data/{barname → bytename}/utils/prefixes.js +0 -0
  113. /package/x/data/{barname → bytename}/utils/suffixes.d.ts +0 -0
  114. /package/x/data/{barname → bytename}/utils/suffixes.js +0 -0
  115. /package/x/{data/barname/demo.d.ts → tests.test.d.ts} +0 -0
@@ -1,78 +0,0 @@
1
-
2
- import {Hex} from "../hex.js"
3
- import {Base58} from "../base58.js"
4
- import {Barname} from "./barname.js"
5
-
6
- /**
7
- * Badge is a human-friendly presentation format for arbitrary binary data.
8
- * - looks like "nomluc_rigpem.tg2bjNkjMh1H6M2b2EhD5V4x6XAqx9wyWddsBt"
9
- * - the first bytes are shown in barname format
10
- * - the rest of the data is in base58
11
- * - designed to be a nice way to present 256-bit passport thumbprints
12
- * - can be used for data of different lengths
13
- * - preview size can be customized as 'leadCount', which defaults to 4
14
- */
15
- export class Badge {
16
- static readonly separator = "."
17
- static readonly defaultLeadCount = 4
18
-
19
- readonly hex: string
20
- readonly string: string
21
- readonly preview: string
22
-
23
- constructor(
24
- public readonly bytes: Uint8Array,
25
- public readonly leadCount = Badge.defaultLeadCount,
26
- ) {
27
-
28
- if (leadCount < 1)
29
- throw new Error(`badge leadCount must be greater than 0 (was ${leadCount})`)
30
-
31
- this.hex = Hex.string(this.bytes)
32
- this.preview = Barname.string(this.bytes.slice(0, leadCount))
33
-
34
- this.string = (bytes.length > leadCount)
35
- ? `${this.preview}.${Base58.string(this.bytes.slice(leadCount))}`
36
- : this.preview
37
- }
38
-
39
- static parse(badge: string) {
40
- const [barname, b58] = badge.split(Badge.separator)
41
-
42
- // badge has a base58 component
43
- if (b58) {
44
- const appetizer = Barname.bytes(barname)
45
- const entree = Base58.bytes(b58)
46
- const bytes = new Uint8Array([...appetizer, ...entree])
47
- return new this(bytes, appetizer.length)
48
- }
49
-
50
- // badge is just a barname (no base58 part)
51
- else {
52
- const bytes = Barname.bytes(barname)
53
- return new this(bytes, bytes.length)
54
- }
55
- }
56
-
57
- static fromHex(hex: string, leadCount = this.defaultLeadCount) {
58
- const bytes = Hex.bytes(hex)
59
- return new this(bytes, leadCount)
60
- }
61
-
62
- static string(bytes: Uint8Array, leadCount = this.defaultLeadCount) {
63
- return new this(bytes, leadCount).string
64
- }
65
-
66
- static bytes(badge: string) {
67
- return this.parse(badge)
68
- }
69
-
70
- static hex(badge: string) {
71
- return this.parse(badge).hex
72
- }
73
-
74
- toString() {
75
- return this.string
76
- }
77
- }
78
-
@@ -1,49 +0,0 @@
1
-
2
- import {Hex} from "../hex.js"
3
- import {Badge} from "./badge.js"
4
- import {Bytes} from "../bytes.js"
5
- import {Barname} from "./barname.js"
6
-
7
- for (const _ of Array(2)) {
8
- const string = Barname.random(34)
9
- const bytes = Barname.bytes(string)
10
- const string2 = Barname.string(bytes)
11
- console.log(string.replaceAll(" ", "\n"))
12
- if (string !== string2)
13
- throw new Error("barname fails equality check")
14
- console.log("")
15
- }
16
-
17
- for (const _ of Array(10)) {
18
- const bytes = Bytes.random(32)
19
- const badge = new Badge(bytes)
20
- const bytes2 = badge.bytes
21
- console.log(badge.string)
22
- if (Hex.string(bytes) !== Hex.string(bytes2))
23
- throw new Error("badge fails equality check")
24
- }
25
-
26
- {
27
- console.log("")
28
- const alpha = `
29
- dacsyd_labdun_fipsub_bonmel
30
- fitlys_rovbud_sipnel_sonryx
31
- sitrem_lasdyr_dovpun_nibwep
32
- tippet_mapnub_ticnet_famset
33
- wanteg
34
- `
35
- const bravo = `
36
- dacsyd-labdun-fipsub-bonmel;
37
- [fitlys rovbud sipnel sonryx]
38
- sitrem/lasdyr/dovpun/nibwep
39
- tippet+mapnub+ticnet+famset
40
- wanteg++
41
- `
42
- const alphaHex = Hex.string(Barname.bytes(alpha))
43
- const bravoHex = Hex.string(Barname.bytes(bravo))
44
- if (alphaHex.length === 68 && alphaHex === bravoHex)
45
- console.log("*barname parsing appears resilient to whitespace and garbage*")
46
- else
47
- throw new Error("barname resiliency failure")
48
- }
49
-
@@ -1,4 +0,0 @@
1
-
2
- export * from "./barname.js"
3
- export * from "./badge.js"
4
-
@@ -1,25 +0,0 @@
1
- /**
2
- * Badge is a human-friendly presentation format for arbitrary binary data.
3
- * - looks like "nomluc_rigpem.tg2bjNkjMh1H6M2b2EhD5V4x6XAqx9wyWddsBt"
4
- * - the first bytes are shown in barname format
5
- * - the rest of the data is in base58
6
- * - designed to be a nice way to present 256-bit passport thumbprints
7
- * - can be used for data of different lengths
8
- * - preview size can be customized as 'leadCount', which defaults to 4
9
- */
10
- export declare class Badge {
11
- readonly bytes: Uint8Array;
12
- readonly leadCount: number;
13
- static readonly separator = ".";
14
- static readonly defaultLeadCount = 4;
15
- readonly hex: string;
16
- readonly string: string;
17
- readonly preview: string;
18
- constructor(bytes: Uint8Array, leadCount?: number);
19
- static parse(badge: string): Badge;
20
- static fromHex(hex: string, leadCount?: number): Badge;
21
- static string(bytes: Uint8Array, leadCount?: number): string;
22
- static bytes(badge: string): Badge;
23
- static hex(badge: string): string;
24
- toString(): string;
25
- }
@@ -1,64 +0,0 @@
1
- import { Hex } from "../hex.js";
2
- import { Base58 } from "../base58.js";
3
- import { Barname } from "./barname.js";
4
- /**
5
- * Badge is a human-friendly presentation format for arbitrary binary data.
6
- * - looks like "nomluc_rigpem.tg2bjNkjMh1H6M2b2EhD5V4x6XAqx9wyWddsBt"
7
- * - the first bytes are shown in barname format
8
- * - the rest of the data is in base58
9
- * - designed to be a nice way to present 256-bit passport thumbprints
10
- * - can be used for data of different lengths
11
- * - preview size can be customized as 'leadCount', which defaults to 4
12
- */
13
- export class Badge {
14
- bytes;
15
- leadCount;
16
- static separator = ".";
17
- static defaultLeadCount = 4;
18
- hex;
19
- string;
20
- preview;
21
- constructor(bytes, leadCount = Badge.defaultLeadCount) {
22
- this.bytes = bytes;
23
- this.leadCount = leadCount;
24
- if (leadCount < 1)
25
- throw new Error(`badge leadCount must be greater than 0 (was ${leadCount})`);
26
- this.hex = Hex.string(this.bytes);
27
- this.preview = Barname.string(this.bytes.slice(0, leadCount));
28
- this.string = (bytes.length > leadCount)
29
- ? `${this.preview}.${Base58.string(this.bytes.slice(leadCount))}`
30
- : this.preview;
31
- }
32
- static parse(badge) {
33
- const [barname, b58] = badge.split(Badge.separator);
34
- // badge has a base58 component
35
- if (b58) {
36
- const appetizer = Barname.bytes(barname);
37
- const entree = Base58.bytes(b58);
38
- const bytes = new Uint8Array([...appetizer, ...entree]);
39
- return new this(bytes, appetizer.length);
40
- }
41
- // badge is just a barname (no base58 part)
42
- else {
43
- const bytes = Barname.bytes(barname);
44
- return new this(bytes, bytes.length);
45
- }
46
- }
47
- static fromHex(hex, leadCount = this.defaultLeadCount) {
48
- const bytes = Hex.bytes(hex);
49
- return new this(bytes, leadCount);
50
- }
51
- static string(bytes, leadCount = this.defaultLeadCount) {
52
- return new this(bytes, leadCount).string;
53
- }
54
- static bytes(badge) {
55
- return this.parse(badge);
56
- }
57
- static hex(badge) {
58
- return this.parse(badge).hex;
59
- }
60
- toString() {
61
- return this.string;
62
- }
63
- }
64
- //# sourceMappingURL=badge.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"badge.js","sourceRoot":"","sources":["../../../s/data/barname/badge.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,WAAW,CAAA;AAC7B,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAA;AACnC,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAA;AAEpC;;;;;;;;GAQG;AACH,MAAM,OAAO,KAAK;IASC;IACA;IATlB,MAAM,CAAU,SAAS,GAAG,GAAG,CAAA;IAC/B,MAAM,CAAU,gBAAgB,GAAG,CAAC,CAAA;IAE3B,GAAG,CAAQ;IACX,MAAM,CAAQ;IACd,OAAO,CAAQ;IAExB,YACkB,KAAiB,EACjB,YAAY,KAAK,CAAC,gBAAgB;QADlC,UAAK,GAAL,KAAK,CAAY;QACjB,cAAS,GAAT,SAAS,CAAyB;QAGnD,IAAI,SAAS,GAAG,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,+CAA+C,SAAS,GAAG,CAAC,CAAA;QAE7E,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAA;QAE7D,IAAI,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;YACvC,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE;YACjE,CAAC,CAAC,IAAI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,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAA;IAC7B,CAAC;IAED,QAAQ;QACP,OAAO,IAAI,CAAC,MAAM,CAAA;IACnB,CAAC"}
@@ -1,7 +0,0 @@
1
- export declare const Barname: {
2
- random(byteCount: number): string;
3
- string(bytes: Uint8Array, options?: {
4
- wordsPerGroup?: number;
5
- }): string;
6
- bytes(string: string): Uint8Array<ArrayBuffer>;
7
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"barname.js","sourceRoot":"","sources":["../../../s/data/barname/barname.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AACjC,OAAO,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAA;AAE5C,MAAM,aAAa,GAAG,GAAG,CAAA;AACzB,MAAM,cAAc,GAAG,GAAG,CAAA;AAC1B,MAAM,oBAAoB,GAAG,CAAC,CAAA;AAE9B,MAAM,CAAC,MAAM,OAAO,GAAG;IACtB,MAAM,CAAC,SAAiB;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAA;IAC5C,CAAC;IAED,MAAM,CAAC,KAAiB,EAAE,OAAkC;QAC3D,MAAM,SAAS,GAAG,OAAO,EAAE,aAAa,IAAI,oBAAoB,CAAA;QAEhE,MAAM,KAAK,GAAa,EAAE,CAAA;QAC1B,IAAI,WAAW,GAAa,EAAE,CAAA;QAE9B,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;YAC7B,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAA;YACxD,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAE,CAAC,CA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UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;YACrD,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAA;YACxD,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,OAAO,CAAC,CAAA;YACnD,IAAI,MAAM,KAAK,CAAC,CAAC;gBAChB,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,EAAE,CAAC,CAAA;YAC9C,OAAO,MAAM,CAAA;QACd,CAAC,CAAC,CAAC,CAAA;IACJ,CAAC;CACD,CAAA"}
@@ -1,45 +0,0 @@
1
- import { Hex } from "../hex.js";
2
- import { Badge } from "./badge.js";
3
- import { Bytes } from "../bytes.js";
4
- import { Barname } from "./barname.js";
5
- for (const _ of Array(2)) {
6
- const string = Barname.random(34);
7
- const bytes = Barname.bytes(string);
8
- const string2 = Barname.string(bytes);
9
- console.log(string.replaceAll(" ", "\n"));
10
- if (string !== string2)
11
- throw new Error("barname fails equality check");
12
- console.log("");
13
- }
14
- for (const _ of Array(10)) {
15
- const bytes = Bytes.random(32);
16
- const badge = new Badge(bytes);
17
- const bytes2 = badge.bytes;
18
- console.log(badge.string);
19
- if (Hex.string(bytes) !== Hex.string(bytes2))
20
- throw new Error("badge fails equality check");
21
- }
22
- {
23
- console.log("");
24
- const alpha = `
25
- dacsyd_labdun_fipsub_bonmel
26
- fitlys_rovbud_sipnel_sonryx
27
- sitrem_lasdyr_dovpun_nibwep
28
- tippet_mapnub_ticnet_famset
29
- wanteg
30
- `;
31
- const bravo = `
32
- dacsyd-labdun-fipsub-bonmel;
33
- [fitlys rovbud sipnel sonryx]
34
- sitrem/lasdyr/dovpun/nibwep
35
- tippet+mapnub+ticnet+famset
36
- wanteg++
37
- `;
38
- const alphaHex = Hex.string(Barname.bytes(alpha));
39
- const bravoHex = Hex.string(Barname.bytes(bravo));
40
- if (alphaHex.length === 68 && alphaHex === bravoHex)
41
- console.log("*barname parsing appears resilient to whitespace and garbage*");
42
- else
43
- throw new Error("barname resiliency failure");
44
- }
45
- //# sourceMappingURL=demo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"demo.js","sourceRoot":"","sources":["../../../s/data/barname/demo.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,WAAW,CAAA;AAC7B,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAA;AAChC,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AACjC,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAA;AAEpC,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1B,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IACjC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IACnC,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IACrC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAA;IACzC,IAAI,MAAM,KAAK,OAAO;QACrB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAA;IAChD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;AAChB,CAAC;AAED,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;IAC3B,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IAC9B,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,CAAA;IAC9B,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAA;IAC1B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IACzB,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC;QAC3C,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;AAC/C,CAAC;AAED,CAAC;IACA,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IACf,MAAM,KAAK,GAAG;;;;;;EAMb,CAAA;IACD,MAAM,KAAK,GAAG;;;;;;EAMb,CAAA;IACD,MAAM,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;IACjD,MAAM,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;IACjD,IAAI,QAAQ,CAAC,MAAM,KAAK,EAAE,IAAI,QAAQ,KAAK,QAAQ;QAClD,OAAO,CAAC,GAAG,CAAC,+DAA+D,CAAC,CAAA;;QAE5E,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;AAC/C,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from "./barname.js";
2
- export * from "./badge.js";
@@ -1,3 +0,0 @@
1
- export * from "./barname.js";
2
- export * from "./badge.js";
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../s/data/barname/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"prefixes.js","sourceRoot":"","sources":["../../../../s/data/barname/utils/prefixes.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,QAAQ,GAAG;IACvB,KAAK,EAAC,KAAK,EAAC,KAAK,EAAC,KAAK,EAAC,KAAK,EAAC,KAAK,EAAC,KAAK,EAAC,KAAK,EAAC,KAAK,EAAC,K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AC,KAAK,EAAC,KAAK,EAAC,KAAK,EAAC,KAAK,EAAC,KAAK,EAAC,KAAK;CAC/F,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"defer-promise.js","sourceRoot":"","sources":["../s/defer-promise.ts"],"names":[],"mappings":"AAWA,qEAAqE;AACrE,MAAM,UAAU,YAAY;IAC3B,IAAI,OAA6B,CAAA;IACjC,IAAI,MAA8B,CAAA;IAElC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAI,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC3C,OAAO,GAAG,GAAG,CAAA;QACb,MAAM,GAAG,GAAG,CAAA;IACb,CAAC,CAAC,CAAA;IAEF,SAAS,QAAQ,CAAC,OAAmB;QACpC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;QACnC,OAAO,OAAO,CAAA;IACf,CAAC;IAED,OAAO,EAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAC,CAAA;AAC5C,CAAC"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes