├── .gitignore
├── LICENSE
├── README.md
├── docs
├── favicon.ico
├── fonts
│ ├── font-files
│ │ ├── Inter-Black.woff
│ │ ├── Inter-Black.woff2
│ │ ├── Inter-BlackItalic.woff
│ │ ├── Inter-BlackItalic.woff2
│ │ ├── Inter-Bold.woff
│ │ ├── Inter-Bold.woff2
│ │ ├── Inter-BoldItalic.woff
│ │ ├── Inter-BoldItalic.woff2
│ │ ├── Inter-ExtraBold.woff
│ │ ├── Inter-ExtraBold.woff2
│ │ ├── Inter-ExtraBoldItalic.woff
│ │ ├── Inter-ExtraBoldItalic.woff2
│ │ ├── Inter-ExtraLight.woff
│ │ ├── Inter-ExtraLight.woff2
│ │ ├── Inter-ExtraLightItalic.woff
│ │ ├── Inter-ExtraLightItalic.woff2
│ │ ├── Inter-Italic.woff
│ │ ├── Inter-Italic.woff2
│ │ ├── Inter-Light.woff
│ │ ├── Inter-Light.woff2
│ │ ├── Inter-LightItalic.woff
│ │ ├── Inter-LightItalic.woff2
│ │ ├── Inter-Medium.woff
│ │ ├── Inter-Medium.woff2
│ │ ├── Inter-MediumItalic.woff
│ │ ├── Inter-MediumItalic.woff2
│ │ ├── Inter-Regular.woff
│ │ ├── Inter-Regular.woff2
│ │ ├── Inter-SemiBold.woff
│ │ ├── Inter-SemiBold.woff2
│ │ ├── Inter-SemiBoldItalic.woff
│ │ ├── Inter-SemiBoldItalic.woff2
│ │ ├── Inter-Thin.woff
│ │ ├── Inter-Thin.woff2
│ │ ├── Inter-ThinItalic.woff
│ │ ├── Inter-ThinItalic.woff2
│ │ ├── Inter-italic.var.woff2
│ │ ├── Inter-roman.var.woff2
│ │ └── Inter.var.woff2
│ └── inter-var.min.css
├── images
│ ├── logo.png
│ └── rocket.png
├── index.html
├── prism.css
├── prism.js
├── script.js
└── styles.css
├── package-lock.json
├── package.json
├── src
└── anabolicset.js
└── test
└── tests.js
/.gitignore:
--------------------------------------------------------------------------------
1 | notes.md
2 | .project
3 | /private
4 | node_modules
5 | .vscode
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 ColonelParrot
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | ---
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | You'll never use [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) again...
23 |
24 | AnabolicSet is built around the optional ability to customize item comparisons with a custom serializer. The uniqueness is guaranteed for the return value of the serializer.
25 |
26 | This allows you to do things like:
27 |
28 | ```javascript
29 | const set1 = new AnabolicSet([{ id: 1 }, { id: 2 }, { id: 2 }], (obj) => obj.id) // <-- serializer
30 | set1.values() // [{id: 1}, {id: 2}]
31 | ```
32 |
33 | ## Featuring...
34 |
35 | - custom comparing with custom serializer (similar to Java's [`HashSet`](https://docs.oracle.com/javase/7/docs/api/java/util/HashSet.html) and `hashCode`)
36 | - improved functionality based upon native [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set)
37 | - [`union`](https://github.com/ColonelParrot/AnabolicSet/wiki#--unionset)
38 | - [`intersect`](https://github.com/ColonelParrot/AnabolicSet/wiki#--intersectset)
39 | - [`complement`](https://github.com/ColonelParrot/AnabolicSet/wiki#--complementset)
40 | - [`isSubsetOf`](https://github.com/ColonelParrot/AnabolicSet/wiki#--issubsetofset)
41 | - [`isSupersetOf`](https://github.com/ColonelParrot/AnabolicSet/wiki#--issupersetofset)
42 | - all native [`Set` methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#instance_methods)
43 | - extensive & broad browser support
44 | - blazing fast 💨 ([up to **70%** faster than native Set](https://jsbench.me/zrlebmbyq1/1) for certain operations)
45 |
46 | ```javascript
47 | const set1 = new AnabolicSet([1, 2, 3, 4, 5])
48 | const set2 = new AnabolicSet([2, 4])
49 |
50 | set1.addAll(...[5, 6])
51 | set1.values() // [1, 2, 3, 4, 5, 6]
52 |
53 | set2.isSubsetOf(set1) // true
54 | set1.isSupersetOf(set2) // true
55 |
56 | set2.add(7)
57 | set1.union(set2) // AnabolicSet [1, 2, 3, 4, 5, 6, 7]
58 | ```
59 |
60 | ## Import
61 |
62 | **npm**:
63 | ```javascript
64 | $ npm i anabolicset
65 | import AnabolicSet from 'anabolicset'
66 | ```
67 |
68 | **cdn**:
69 | ```html
70 |
71 | ```
72 |
73 |
74 | documentation
75 |
--------------------------------------------------------------------------------
/docs/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/favicon.ico
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-Black.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-Black.woff
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-Black.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-Black.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-BlackItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-BlackItalic.woff
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-BlackItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-BlackItalic.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-Bold.woff
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-Bold.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-BoldItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-BoldItalic.woff
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-BoldItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-BoldItalic.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-ExtraBold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-ExtraBold.woff
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-ExtraBold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-ExtraBold.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-ExtraBoldItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-ExtraBoldItalic.woff
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-ExtraBoldItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-ExtraBoldItalic.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-ExtraLight.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-ExtraLight.woff
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-ExtraLight.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-ExtraLight.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-ExtraLightItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-ExtraLightItalic.woff
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-ExtraLightItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-ExtraLightItalic.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-Italic.woff
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-Italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-Italic.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-Light.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-Light.woff
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-Light.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-Light.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-LightItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-LightItalic.woff
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-LightItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-LightItalic.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-Medium.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-Medium.woff
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-Medium.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-Medium.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-MediumItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-MediumItalic.woff
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-MediumItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-MediumItalic.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-Regular.woff
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-Regular.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-SemiBold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-SemiBold.woff
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-SemiBold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-SemiBold.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-SemiBoldItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-SemiBoldItalic.woff
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-SemiBoldItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-SemiBoldItalic.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-Thin.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-Thin.woff
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-Thin.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-Thin.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-ThinItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-ThinItalic.woff
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-ThinItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-ThinItalic.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-italic.var.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-italic.var.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter-roman.var.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter-roman.var.woff2
--------------------------------------------------------------------------------
/docs/fonts/font-files/Inter.var.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/fonts/font-files/Inter.var.woff2
--------------------------------------------------------------------------------
/docs/fonts/inter-var.min.css:
--------------------------------------------------------------------------------
1 | @font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:100;src:url(font-files/Inter-Thin.woff2?v=3.19) format("woff2")}@font-face{font-display:swap;font-family:Inter;font-style:italic;font-weight:100;src:url(font-files/Inter-ThinItalic.woff2?v=3.19) format("woff2")}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:200;src:url(font-files/Inter-ExtraLight.woff2?v=3.19) format("woff2")}@font-face{font-display:swap;font-family:Inter;font-style:italic;font-weight:200;src:url(font-files/Inter-ExtraLightItalic.woff2?v=3.19) format("woff2")}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:300;src:url(font-files/Inter-Light.woff2?v=3.19) format("woff2")}@font-face{font-display:swap;font-family:Inter;font-style:italic;font-weight:300;src:url(font-files/Inter-LightItalic.woff2?v=3.19) format("woff2")}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:400;src:url(font-files/Inter-Regular.woff2?v=3.19) format("woff2")}@font-face{font-display:swap;font-family:Inter;font-style:italic;font-weight:400;src:url(font-files/Inter-Italic.woff2?v=3.19) format("woff2")}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:500;src:url(font-files/Inter-Medium.woff2?v=3.19) format("woff2")}@font-face{font-display:swap;font-family:Inter;font-style:italic;font-weight:500;src:url(font-files/Inter-MediumItalic.woff2?v=3.19) format("woff2")}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:600;src:url(font-files/Inter-SemiBold.woff2?v=3.19) format("woff2")}@font-face{font-display:swap;font-family:Inter;font-style:italic;font-weight:600;src:url(font-files/Inter-SemiBoldItalic.woff2?v=3.19) format("woff2")}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:700;src:url(font-files/Inter-Bold.woff2?v=3.19) format("woff2")}@font-face{font-display:swap;font-family:Inter;font-style:italic;font-weight:700;src:url(font-files/Inter-BoldItalic.woff2?v=3.19) format("woff2")}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:800;src:url(font-files/Inter-ExtraBold.woff2?v=3.19) format("woff2")}@font-face{font-display:swap;font-family:Inter;font-style:italic;font-weight:800;src:url(font-files/Inter-ExtraBoldItalic.woff2?v=3.19) format("woff2")}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:900;src:url(font-files/Inter-Black.woff2?v=3.19) format("woff2")}@font-face{font-display:swap;font-family:Inter;font-style:italic;font-weight:900;src:url(font-files/Inter-BlackItalic.woff2?v=3.19) format("woff2")}@font-face{font-named-instance:"Regular";font-display:swap;font-family:Inter var;font-style:normal;font-weight:100 900;src:url(font-files/Inter-roman.var.woff2?v=3.19) format("woff2")}@font-face{font-named-instance:"Italic";font-display:swap;font-family:Inter var;font-style:italic;font-weight:100 900;src:url(font-files/Inter-italic.var.woff2?v=3.19) format("woff2")}@font-face{font-display:swap;font-family:Inter var experimental;font-style:oblique 0deg 10deg;font-weight:100 900;src:url(font-files/Inter.var.woff2?v=3.19) format("woff2")}@font-face{font-named-instance:"Regular";font-display:swap;font-family:Inter var alt;font-style:normal;font-weight:100 900;src:url(font-files/Inter-roman.var.woff2?v=3.19) format("woff2")}@font-face{font-named-instance:"Italic";font-display:swap;font-family:Inter var alt;font-style:italic;font-weight:100 900;src:url(font-files/Inter-italic.var.woff2?v=3.19) format("woff2")}
--------------------------------------------------------------------------------
/docs/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/images/logo.png
--------------------------------------------------------------------------------
/docs/images/rocket.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/puffinsoft/AnabolicSet/083fd4d14ceccbc75817037be41ff014a7adeec2/docs/images/rocket.png
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | AnabolicSet: Javascript Set on steroids
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
29 |
30 |
33 |
36 |
37 |
38 |
AnabolicSet
39 |
The most powerful Set in JavaScript
40 |
61 |
62 |
69 |
const serializer = (item) => item.id
70 | const set = new AnabolicSet([{ id: 0 }, { id: 1 }, { id: 1 }], serializer)
71 | set.values() // [{ id: 0 }, { id: 1 }]
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
Set on steroids
83 |
84 | - custom comparisons with a serializer
85 |
86 | - improved functionality based upon Set (union, intersect,
87 | complement, isSubsetOf)
88 |
89 | - built upon Set - instantly transfer over
90 |
91 | - blazingly fast 💨 (up to 70%
92 | faster than native Set on certain operations)
93 |
94 |
95 |
96 |
97 |
TRY IT OUT!
98 |
99 |
100 |
101 |
102 |
npm
103 |
html
104 |
105 |
106 |
107 |
$ npm i anabolicset
108 | $ import AnabolicSet from 'anabolicset'
109 |
111 |
114 |
115 |
116 |
118 |
120 |
121 |
122 |
123 |
124 |
125 |
<script src="https://cdn.jsdelivr.net/gh/ColonelParrot/AnabolicSet@latest/src/anabolicset.min.js"></script>
126 |
128 |
131 |
132 |
133 |
135 |
137 |
138 |
139 |
140 |
141 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
--------------------------------------------------------------------------------
/docs/prism.css:
--------------------------------------------------------------------------------
1 | /* PrismJS 1.29.0
2 | https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript */
3 | code[class*=language-],pre[class*=language-]{color:#ccc;background:0 0;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#999}.token.punctuation{color:#ccc}.token.attr-name,.token.deleted,.token.namespace,.token.tag{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.function,.token.number{color:#f08d49}.token.class-name,.token.constant,.token.property,.token.symbol{color:#f8c555}.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{color:#cc99cd}.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{color:#7ec699}.token.entity,.token.operator,.token.url{color:#67cdcc}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}
4 |
--------------------------------------------------------------------------------
/docs/prism.js:
--------------------------------------------------------------------------------
1 | /* PrismJS 1.29.0
2 | https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript */
3 | var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){var n=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,r={},a={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof i?new i(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=g.reach);A+=w.value.length,w=w.next){var E=w.value;if(n.length>e.length)return;if(!(E instanceof i)){var P,L=1;if(y){if(!(P=l(b,A,e,m))||P.index>=e.length)break;var S=P.index,O=P.index+P[0].length,j=A;for(j+=w.value.length;S>=j;)j+=(w=w.next).value.length;if(A=j-=w.value.length,w.value instanceof i)continue;for(var C=w;C!==n.tail&&(jg.reach&&(g.reach=W);var z=w.prev;if(_&&(z=u(n,z,_),A+=_.length),c(n,z,L),w=u(n,z,new i(f,p?a.tokenize(N,p):N,k,N)),M&&u(n,w,M),L>1){var I={cause:f+","+d,reach:W};o(e,n,t,w.prev,A,I),g&&I.reach>g.reach&&(g.reach=I.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function u(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function c(e,n,t){for(var r=n.next,a=0;a"+i.content+""+i.tag+">"},!e.document)return e.addEventListener?(a.disableWorkerMessageHandler||e.addEventListener("message",(function(n){var t=JSON.parse(n.data),r=t.language,i=t.code,l=t.immediateClose;e.postMessage(a.highlight(i,a.languages[r],r)),l&&e.close()}),!1),a):a;var g=a.util.currentScript();function f(){a.manual||a.highlightAll()}if(g&&(a.filename=g.src,g.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var h=document.readyState;"loading"===h||"interactive"===h&&g&&g.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return a}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
4 | Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,(function(){return a})),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml;
5 | !function(s){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:[^;{\\s\"']|\\s+(?!\\s)|"+e.source+")*?(?:;|(?=\\s*\\{))"),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(Prism);
6 | Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};
7 | Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))"),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript;
8 |
--------------------------------------------------------------------------------
/docs/script.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | const clipboardData = {
3 | npm: "npm i anabolicset\nimport AnabolicSet from 'anabolicset'",
4 | html: ``
5 | }
6 |
7 | $('.terminal-copy').click(function () {
8 | const clipboardKey = $(this).data('clipboard-key')
9 | navigator.clipboard.writeText(clipboardData[clipboardKey]).then(() => {
10 | $(this).hide().siblings('.terminal-copied').show()
11 | setTimeout(() => {
12 | $(this).show().siblings('.terminal-copied').hide()
13 | }, 1250)
14 | })
15 | })
16 |
17 | $('.installation-option').click(function(){
18 | $('.installation-option').removeClass('active-option')
19 | $(this).addClass('active-option')
20 | const id = $(this).data('id')
21 | $('#installation .option').hide()
22 | $(`#installation .option[data-id="${id}"]`).show()
23 | })
24 | })()
--------------------------------------------------------------------------------
/docs/styles.css:
--------------------------------------------------------------------------------
1 | @import url("https://fonts.googleapis.com/css2?family=Inter");
2 |
3 | :root {
4 | --theme-dark-light: #313338;
5 | --font-mono: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
6 | monospace;
7 | }
8 |
9 | html,
10 | body {
11 | margin: 0;
12 | }
13 |
14 | a {
15 | color: #0969da;
16 | }
17 |
18 | #hero {
19 | padding: 80px 20px;
20 | padding-top: 100px;
21 | text-align: center;
22 | position: relative;
23 | overflow: hidden;
24 | }
25 |
26 | #hero_bg {
27 | background: var(--theme-dark-light);
28 | height: 300px;
29 | margin: 0 !important;
30 | padding: 0 !important;
31 | position: absolute;
32 | top: 0;
33 | left: 0;
34 | -webkit-transform: skewY(-6deg) scale(2.6) translate3d(-50%, 22%, 0);
35 | transform: skewY(-6deg) scale(2.6) translate3d(-50%, 22%, 0);
36 | -webkit-transform-origin: 0 100%;
37 | -ms-transform-origin: 0 100%;
38 | transform-origin: 0 100%;
39 | width: 100%;
40 | z-index: -1;
41 | box-sizing: border-box;
42 | }
43 |
44 | #hero #logo {
45 | font-size: 52px;
46 | background: -webkit-linear-gradient(300deg, #1e82fa 20%, #74b5fb 70%);
47 | -webkit-background-clip: text;
48 | background-clip: text;
49 | -webkit-text-fill-color: transparent;
50 | -webkit-box-decoration-break: clone;
51 | line-height: 64px !important;
52 | }
53 |
54 | #hero h1 {
55 | font-family: "Inter var", sans-serif;
56 | font-size: 35px;
57 | font-weight: 800;
58 | margin: auto;
59 | max-width: 80%;
60 | color: white;
61 | }
62 |
63 | #terminal {
64 | width: 60%;
65 | max-width: 800px;
66 | margin: auto;
67 | margin-top: 30px;
68 | background: black !important;
69 | border-radius: 3px;
70 | text-align: left;
71 | box-shadow: 0 0 3px black;
72 | }
73 |
74 | #terminal .header {
75 | line-height: 0;
76 | padding: 12px;
77 | }
78 |
79 | #terminal pre::-webkit-scrollbar {
80 | height: 14px;
81 | }
82 | #terminal pre::-webkit-scrollbar-thumb {
83 | border: 4px solid rgba(0, 0, 0, 0);
84 | background-clip: padding-box;
85 | border-radius: 6px;
86 | background-color: rgb(255, 255, 255, 0.5);
87 | }
88 |
89 | .view-on .view-on-option {
90 | padding: 12px 18px;
91 | border-radius: 6px;
92 | background: white;
93 | color: black;
94 | text-decoration: none;
95 | font-family: "Inter";
96 | font-size: 14px;
97 | display: inline-flex;
98 | align-items: center;
99 | }
100 |
101 | .view-on .view-on-option svg {
102 | margin-right: 8px;
103 | }
104 |
105 | .row {
106 | display: flex;
107 | flex-wrap: wrap;
108 | margin: auto;
109 | justify-content: center;
110 | margin: 0 30px;
111 | }
112 |
113 | #content h2 {
114 | font-family: "Inter var", sans-serif;
115 | font-weight: 800;
116 | font-size: 30px;
117 | }
118 |
119 | #content .row .text-content h2 {
120 | margin-bottom: 0;
121 | }
122 |
123 | #content .row .text-content p {
124 | color: #57606a;
125 | font-family: "Inter var";
126 | font-weight: 400;
127 | font-size: 20px;
128 | margin-top: 10px;
129 | }
130 |
131 | #installation {
132 | font-family: "Inter var";
133 | background-color: var(--theme-dark-light);
134 | color: white;
135 | padding: 50px 20px;
136 | margin-top: 100px;
137 | }
138 |
139 | #installation .installation-options {
140 | display: flex;
141 | font-size: 20px;
142 | width: 80%;
143 | max-width: 1000px;
144 | margin: auto;
145 | }
146 |
147 | #installation .installation-option {
148 | user-select: none;
149 | cursor: pointer;
150 | }
151 |
152 | #installation .installation-option.active-option {
153 | text-decoration: underline;
154 | }
155 |
156 | #installation .option {
157 | width: 80%;
158 | max-width: 1000px;
159 | margin: auto;
160 | margin-top: 20px;
161 | }
162 |
163 | #installation .terminal {
164 | font-size: 14px;
165 | line-height: 34px;
166 | background-color: rgb(0, 0, 0, 0.5);
167 | border: 1px solid rgba(166, 175, 194, 0.25);
168 | border-radius: 8px;
169 | padding: 11px 16px;
170 | font-family: var(--font-mono);
171 | position: relative;
172 | overflow: auto;
173 | white-space: nowrap;
174 | transition: 0.3s;
175 | }
176 |
177 | .terminal pre {
178 | overflow: auto;
179 | padding: 0 !important;
180 | background: transparent !important;
181 | }
182 |
183 | .terminal code {
184 | background-color: transparent;
185 | padding: 0 !important;
186 | overflow: hidden;
187 | }
188 |
189 | .terminal pre::-webkit-scrollbar {
190 | height: 14px;
191 | }
192 |
193 | .terminal pre::-webkit-scrollbar-thumb {
194 | border: 4px solid rgba(0, 0, 0, 0);
195 | background-clip: padding-box;
196 | border-radius: 9999px;
197 | background-color: rgb(255, 255, 255, 0.5);
198 | }
199 |
200 | #installation .terminal:hover {
201 | border-color: rgba(166, 175, 194, 0.8);
202 | }
203 |
204 | #installation .terminal .terminal-icon {
205 | position: absolute;
206 | right: 10px;
207 | top: 10px;
208 | cursor: pointer;
209 | opacity: 0;
210 | transition: 0.2s;
211 | }
212 |
213 | #installation .terminal:hover .terminal-icon {
214 | opacity: 1;
215 | }
216 |
217 | #installation .terminal .terminal-copied {
218 | display: none;
219 | }
220 |
221 | #further-steps {
222 | text-align: center;
223 | font-size: 20px;
224 | font-family: "Inter var";
225 | margin-top: 40px;
226 | padding-bottom: 40px;
227 | }
228 |
229 | #further-steps a {
230 | text-decoration: none;
231 | }
232 |
233 | @media only screen and (max-width: 460px) {
234 | #hero #logo {
235 | font-size: 40px;
236 | margin-bottom: 20px;
237 | }
238 | #hero h1 {
239 | font-size: 25px;
240 | }
241 | }
242 |
243 | @media only screen and (max-width: 800px) {
244 | #terminal {
245 | width: 80%;
246 | }
247 | }
248 |
249 | @media only screen and (max-width: 1132px) {
250 | #content .row img {
251 | margin-right: 0 !important;
252 | }
253 | }
254 |
255 | #demo {
256 | text-align: center;
257 | }
258 |
259 | #demo iframe {
260 | width: 80%;
261 | max-width: 900px;
262 | margin: auto;
263 | margin-top: 10px;
264 | border: none;
265 | border-radius: 10px;
266 | background-color: #15181E;
267 | }
268 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "anabolicset",
3 | "version": "1.4.1",
4 | "lockfileVersion": 2,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "anabolicset",
9 | "version": "1.4.1",
10 | "license": "MIT",
11 | "dependencies": {
12 | "mocha": "^10.2.0"
13 | }
14 | },
15 | "node_modules/ansi-colors": {
16 | "version": "4.1.1",
17 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
18 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
19 | "engines": {
20 | "node": ">=6"
21 | }
22 | },
23 | "node_modules/ansi-regex": {
24 | "version": "5.0.1",
25 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
26 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
27 | "engines": {
28 | "node": ">=8"
29 | }
30 | },
31 | "node_modules/ansi-styles": {
32 | "version": "4.3.0",
33 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
34 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
35 | "dependencies": {
36 | "color-convert": "^2.0.1"
37 | },
38 | "engines": {
39 | "node": ">=8"
40 | },
41 | "funding": {
42 | "url": "https://github.com/chalk/ansi-styles?sponsor=1"
43 | }
44 | },
45 | "node_modules/anymatch": {
46 | "version": "3.1.3",
47 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
48 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
49 | "dependencies": {
50 | "normalize-path": "^3.0.0",
51 | "picomatch": "^2.0.4"
52 | },
53 | "engines": {
54 | "node": ">= 8"
55 | }
56 | },
57 | "node_modules/argparse": {
58 | "version": "2.0.1",
59 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
60 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
61 | },
62 | "node_modules/balanced-match": {
63 | "version": "1.0.2",
64 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
65 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
66 | },
67 | "node_modules/binary-extensions": {
68 | "version": "2.2.0",
69 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
70 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
71 | "engines": {
72 | "node": ">=8"
73 | }
74 | },
75 | "node_modules/brace-expansion": {
76 | "version": "2.0.1",
77 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
78 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
79 | "dependencies": {
80 | "balanced-match": "^1.0.0"
81 | }
82 | },
83 | "node_modules/braces": {
84 | "version": "3.0.2",
85 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
86 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
87 | "dependencies": {
88 | "fill-range": "^7.0.1"
89 | },
90 | "engines": {
91 | "node": ">=8"
92 | }
93 | },
94 | "node_modules/browser-stdout": {
95 | "version": "1.3.1",
96 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
97 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw=="
98 | },
99 | "node_modules/camelcase": {
100 | "version": "6.3.0",
101 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
102 | "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
103 | "engines": {
104 | "node": ">=10"
105 | },
106 | "funding": {
107 | "url": "https://github.com/sponsors/sindresorhus"
108 | }
109 | },
110 | "node_modules/chalk": {
111 | "version": "4.1.2",
112 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
113 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
114 | "dependencies": {
115 | "ansi-styles": "^4.1.0",
116 | "supports-color": "^7.1.0"
117 | },
118 | "engines": {
119 | "node": ">=10"
120 | },
121 | "funding": {
122 | "url": "https://github.com/chalk/chalk?sponsor=1"
123 | }
124 | },
125 | "node_modules/chalk/node_modules/supports-color": {
126 | "version": "7.2.0",
127 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
128 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
129 | "dependencies": {
130 | "has-flag": "^4.0.0"
131 | },
132 | "engines": {
133 | "node": ">=8"
134 | }
135 | },
136 | "node_modules/chokidar": {
137 | "version": "3.5.3",
138 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
139 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
140 | "funding": [
141 | {
142 | "type": "individual",
143 | "url": "https://paulmillr.com/funding/"
144 | }
145 | ],
146 | "dependencies": {
147 | "anymatch": "~3.1.2",
148 | "braces": "~3.0.2",
149 | "glob-parent": "~5.1.2",
150 | "is-binary-path": "~2.1.0",
151 | "is-glob": "~4.0.1",
152 | "normalize-path": "~3.0.0",
153 | "readdirp": "~3.6.0"
154 | },
155 | "engines": {
156 | "node": ">= 8.10.0"
157 | },
158 | "optionalDependencies": {
159 | "fsevents": "~2.3.2"
160 | }
161 | },
162 | "node_modules/cliui": {
163 | "version": "7.0.4",
164 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
165 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
166 | "dependencies": {
167 | "string-width": "^4.2.0",
168 | "strip-ansi": "^6.0.0",
169 | "wrap-ansi": "^7.0.0"
170 | }
171 | },
172 | "node_modules/color-convert": {
173 | "version": "2.0.1",
174 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
175 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
176 | "dependencies": {
177 | "color-name": "~1.1.4"
178 | },
179 | "engines": {
180 | "node": ">=7.0.0"
181 | }
182 | },
183 | "node_modules/color-name": {
184 | "version": "1.1.4",
185 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
186 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
187 | },
188 | "node_modules/concat-map": {
189 | "version": "0.0.1",
190 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
191 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
192 | },
193 | "node_modules/debug": {
194 | "version": "4.3.4",
195 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
196 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
197 | "dependencies": {
198 | "ms": "2.1.2"
199 | },
200 | "engines": {
201 | "node": ">=6.0"
202 | },
203 | "peerDependenciesMeta": {
204 | "supports-color": {
205 | "optional": true
206 | }
207 | }
208 | },
209 | "node_modules/debug/node_modules/ms": {
210 | "version": "2.1.2",
211 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
212 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
213 | },
214 | "node_modules/decamelize": {
215 | "version": "4.0.0",
216 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz",
217 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==",
218 | "engines": {
219 | "node": ">=10"
220 | },
221 | "funding": {
222 | "url": "https://github.com/sponsors/sindresorhus"
223 | }
224 | },
225 | "node_modules/diff": {
226 | "version": "5.0.0",
227 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz",
228 | "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==",
229 | "engines": {
230 | "node": ">=0.3.1"
231 | }
232 | },
233 | "node_modules/emoji-regex": {
234 | "version": "8.0.0",
235 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
236 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
237 | },
238 | "node_modules/escalade": {
239 | "version": "3.1.1",
240 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
241 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
242 | "engines": {
243 | "node": ">=6"
244 | }
245 | },
246 | "node_modules/escape-string-regexp": {
247 | "version": "4.0.0",
248 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
249 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
250 | "engines": {
251 | "node": ">=10"
252 | },
253 | "funding": {
254 | "url": "https://github.com/sponsors/sindresorhus"
255 | }
256 | },
257 | "node_modules/fill-range": {
258 | "version": "7.0.1",
259 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
260 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
261 | "dependencies": {
262 | "to-regex-range": "^5.0.1"
263 | },
264 | "engines": {
265 | "node": ">=8"
266 | }
267 | },
268 | "node_modules/find-up": {
269 | "version": "5.0.0",
270 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
271 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
272 | "dependencies": {
273 | "locate-path": "^6.0.0",
274 | "path-exists": "^4.0.0"
275 | },
276 | "engines": {
277 | "node": ">=10"
278 | },
279 | "funding": {
280 | "url": "https://github.com/sponsors/sindresorhus"
281 | }
282 | },
283 | "node_modules/flat": {
284 | "version": "5.0.2",
285 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz",
286 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==",
287 | "bin": {
288 | "flat": "cli.js"
289 | }
290 | },
291 | "node_modules/fs.realpath": {
292 | "version": "1.0.0",
293 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
294 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
295 | },
296 | "node_modules/get-caller-file": {
297 | "version": "2.0.5",
298 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
299 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
300 | "engines": {
301 | "node": "6.* || 8.* || >= 10.*"
302 | }
303 | },
304 | "node_modules/glob": {
305 | "version": "7.2.0",
306 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
307 | "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
308 | "dependencies": {
309 | "fs.realpath": "^1.0.0",
310 | "inflight": "^1.0.4",
311 | "inherits": "2",
312 | "minimatch": "^3.0.4",
313 | "once": "^1.3.0",
314 | "path-is-absolute": "^1.0.0"
315 | },
316 | "engines": {
317 | "node": "*"
318 | },
319 | "funding": {
320 | "url": "https://github.com/sponsors/isaacs"
321 | }
322 | },
323 | "node_modules/glob-parent": {
324 | "version": "5.1.2",
325 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
326 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
327 | "dependencies": {
328 | "is-glob": "^4.0.1"
329 | },
330 | "engines": {
331 | "node": ">= 6"
332 | }
333 | },
334 | "node_modules/glob/node_modules/brace-expansion": {
335 | "version": "1.1.11",
336 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
337 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
338 | "dependencies": {
339 | "balanced-match": "^1.0.0",
340 | "concat-map": "0.0.1"
341 | }
342 | },
343 | "node_modules/glob/node_modules/minimatch": {
344 | "version": "3.1.2",
345 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
346 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
347 | "dependencies": {
348 | "brace-expansion": "^1.1.7"
349 | },
350 | "engines": {
351 | "node": "*"
352 | }
353 | },
354 | "node_modules/has-flag": {
355 | "version": "4.0.0",
356 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
357 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
358 | "engines": {
359 | "node": ">=8"
360 | }
361 | },
362 | "node_modules/he": {
363 | "version": "1.2.0",
364 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
365 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
366 | "bin": {
367 | "he": "bin/he"
368 | }
369 | },
370 | "node_modules/inflight": {
371 | "version": "1.0.6",
372 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
373 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
374 | "dependencies": {
375 | "once": "^1.3.0",
376 | "wrappy": "1"
377 | }
378 | },
379 | "node_modules/inherits": {
380 | "version": "2.0.4",
381 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
382 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
383 | },
384 | "node_modules/is-binary-path": {
385 | "version": "2.1.0",
386 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
387 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
388 | "dependencies": {
389 | "binary-extensions": "^2.0.0"
390 | },
391 | "engines": {
392 | "node": ">=8"
393 | }
394 | },
395 | "node_modules/is-extglob": {
396 | "version": "2.1.1",
397 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
398 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
399 | "engines": {
400 | "node": ">=0.10.0"
401 | }
402 | },
403 | "node_modules/is-fullwidth-code-point": {
404 | "version": "3.0.0",
405 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
406 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
407 | "engines": {
408 | "node": ">=8"
409 | }
410 | },
411 | "node_modules/is-glob": {
412 | "version": "4.0.3",
413 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
414 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
415 | "dependencies": {
416 | "is-extglob": "^2.1.1"
417 | },
418 | "engines": {
419 | "node": ">=0.10.0"
420 | }
421 | },
422 | "node_modules/is-number": {
423 | "version": "7.0.0",
424 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
425 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
426 | "engines": {
427 | "node": ">=0.12.0"
428 | }
429 | },
430 | "node_modules/is-plain-obj": {
431 | "version": "2.1.0",
432 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",
433 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==",
434 | "engines": {
435 | "node": ">=8"
436 | }
437 | },
438 | "node_modules/is-unicode-supported": {
439 | "version": "0.1.0",
440 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz",
441 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==",
442 | "engines": {
443 | "node": ">=10"
444 | },
445 | "funding": {
446 | "url": "https://github.com/sponsors/sindresorhus"
447 | }
448 | },
449 | "node_modules/js-yaml": {
450 | "version": "4.1.0",
451 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
452 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
453 | "dependencies": {
454 | "argparse": "^2.0.1"
455 | },
456 | "bin": {
457 | "js-yaml": "bin/js-yaml.js"
458 | }
459 | },
460 | "node_modules/locate-path": {
461 | "version": "6.0.0",
462 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
463 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
464 | "dependencies": {
465 | "p-locate": "^5.0.0"
466 | },
467 | "engines": {
468 | "node": ">=10"
469 | },
470 | "funding": {
471 | "url": "https://github.com/sponsors/sindresorhus"
472 | }
473 | },
474 | "node_modules/log-symbols": {
475 | "version": "4.1.0",
476 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",
477 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",
478 | "dependencies": {
479 | "chalk": "^4.1.0",
480 | "is-unicode-supported": "^0.1.0"
481 | },
482 | "engines": {
483 | "node": ">=10"
484 | },
485 | "funding": {
486 | "url": "https://github.com/sponsors/sindresorhus"
487 | }
488 | },
489 | "node_modules/minimatch": {
490 | "version": "5.0.1",
491 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz",
492 | "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==",
493 | "dependencies": {
494 | "brace-expansion": "^2.0.1"
495 | },
496 | "engines": {
497 | "node": ">=10"
498 | }
499 | },
500 | "node_modules/mocha": {
501 | "version": "10.2.0",
502 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz",
503 | "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==",
504 | "dependencies": {
505 | "ansi-colors": "4.1.1",
506 | "browser-stdout": "1.3.1",
507 | "chokidar": "3.5.3",
508 | "debug": "4.3.4",
509 | "diff": "5.0.0",
510 | "escape-string-regexp": "4.0.0",
511 | "find-up": "5.0.0",
512 | "glob": "7.2.0",
513 | "he": "1.2.0",
514 | "js-yaml": "4.1.0",
515 | "log-symbols": "4.1.0",
516 | "minimatch": "5.0.1",
517 | "ms": "2.1.3",
518 | "nanoid": "3.3.3",
519 | "serialize-javascript": "6.0.0",
520 | "strip-json-comments": "3.1.1",
521 | "supports-color": "8.1.1",
522 | "workerpool": "6.2.1",
523 | "yargs": "16.2.0",
524 | "yargs-parser": "20.2.4",
525 | "yargs-unparser": "2.0.0"
526 | },
527 | "bin": {
528 | "_mocha": "bin/_mocha",
529 | "mocha": "bin/mocha.js"
530 | },
531 | "engines": {
532 | "node": ">= 14.0.0"
533 | },
534 | "funding": {
535 | "type": "opencollective",
536 | "url": "https://opencollective.com/mochajs"
537 | }
538 | },
539 | "node_modules/ms": {
540 | "version": "2.1.3",
541 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
542 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
543 | },
544 | "node_modules/nanoid": {
545 | "version": "3.3.3",
546 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz",
547 | "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==",
548 | "bin": {
549 | "nanoid": "bin/nanoid.cjs"
550 | },
551 | "engines": {
552 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
553 | }
554 | },
555 | "node_modules/normalize-path": {
556 | "version": "3.0.0",
557 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
558 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
559 | "engines": {
560 | "node": ">=0.10.0"
561 | }
562 | },
563 | "node_modules/once": {
564 | "version": "1.4.0",
565 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
566 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
567 | "dependencies": {
568 | "wrappy": "1"
569 | }
570 | },
571 | "node_modules/p-limit": {
572 | "version": "3.1.0",
573 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
574 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
575 | "dependencies": {
576 | "yocto-queue": "^0.1.0"
577 | },
578 | "engines": {
579 | "node": ">=10"
580 | },
581 | "funding": {
582 | "url": "https://github.com/sponsors/sindresorhus"
583 | }
584 | },
585 | "node_modules/p-locate": {
586 | "version": "5.0.0",
587 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
588 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
589 | "dependencies": {
590 | "p-limit": "^3.0.2"
591 | },
592 | "engines": {
593 | "node": ">=10"
594 | },
595 | "funding": {
596 | "url": "https://github.com/sponsors/sindresorhus"
597 | }
598 | },
599 | "node_modules/path-exists": {
600 | "version": "4.0.0",
601 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
602 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
603 | "engines": {
604 | "node": ">=8"
605 | }
606 | },
607 | "node_modules/path-is-absolute": {
608 | "version": "1.0.1",
609 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
610 | "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
611 | "engines": {
612 | "node": ">=0.10.0"
613 | }
614 | },
615 | "node_modules/picomatch": {
616 | "version": "2.3.1",
617 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
618 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
619 | "engines": {
620 | "node": ">=8.6"
621 | },
622 | "funding": {
623 | "url": "https://github.com/sponsors/jonschlinkert"
624 | }
625 | },
626 | "node_modules/randombytes": {
627 | "version": "2.1.0",
628 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
629 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
630 | "dependencies": {
631 | "safe-buffer": "^5.1.0"
632 | }
633 | },
634 | "node_modules/readdirp": {
635 | "version": "3.6.0",
636 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
637 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
638 | "dependencies": {
639 | "picomatch": "^2.2.1"
640 | },
641 | "engines": {
642 | "node": ">=8.10.0"
643 | }
644 | },
645 | "node_modules/require-directory": {
646 | "version": "2.1.1",
647 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
648 | "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
649 | "engines": {
650 | "node": ">=0.10.0"
651 | }
652 | },
653 | "node_modules/safe-buffer": {
654 | "version": "5.2.1",
655 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
656 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
657 | "funding": [
658 | {
659 | "type": "github",
660 | "url": "https://github.com/sponsors/feross"
661 | },
662 | {
663 | "type": "patreon",
664 | "url": "https://www.patreon.com/feross"
665 | },
666 | {
667 | "type": "consulting",
668 | "url": "https://feross.org/support"
669 | }
670 | ]
671 | },
672 | "node_modules/serialize-javascript": {
673 | "version": "6.0.0",
674 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz",
675 | "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==",
676 | "dependencies": {
677 | "randombytes": "^2.1.0"
678 | }
679 | },
680 | "node_modules/string-width": {
681 | "version": "4.2.3",
682 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
683 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
684 | "dependencies": {
685 | "emoji-regex": "^8.0.0",
686 | "is-fullwidth-code-point": "^3.0.0",
687 | "strip-ansi": "^6.0.1"
688 | },
689 | "engines": {
690 | "node": ">=8"
691 | }
692 | },
693 | "node_modules/strip-ansi": {
694 | "version": "6.0.1",
695 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
696 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
697 | "dependencies": {
698 | "ansi-regex": "^5.0.1"
699 | },
700 | "engines": {
701 | "node": ">=8"
702 | }
703 | },
704 | "node_modules/strip-json-comments": {
705 | "version": "3.1.1",
706 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
707 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
708 | "engines": {
709 | "node": ">=8"
710 | },
711 | "funding": {
712 | "url": "https://github.com/sponsors/sindresorhus"
713 | }
714 | },
715 | "node_modules/supports-color": {
716 | "version": "8.1.1",
717 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
718 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
719 | "dependencies": {
720 | "has-flag": "^4.0.0"
721 | },
722 | "engines": {
723 | "node": ">=10"
724 | },
725 | "funding": {
726 | "url": "https://github.com/chalk/supports-color?sponsor=1"
727 | }
728 | },
729 | "node_modules/to-regex-range": {
730 | "version": "5.0.1",
731 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
732 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
733 | "dependencies": {
734 | "is-number": "^7.0.0"
735 | },
736 | "engines": {
737 | "node": ">=8.0"
738 | }
739 | },
740 | "node_modules/workerpool": {
741 | "version": "6.2.1",
742 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz",
743 | "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw=="
744 | },
745 | "node_modules/wrap-ansi": {
746 | "version": "7.0.0",
747 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
748 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
749 | "dependencies": {
750 | "ansi-styles": "^4.0.0",
751 | "string-width": "^4.1.0",
752 | "strip-ansi": "^6.0.0"
753 | },
754 | "engines": {
755 | "node": ">=10"
756 | },
757 | "funding": {
758 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
759 | }
760 | },
761 | "node_modules/wrappy": {
762 | "version": "1.0.2",
763 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
764 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
765 | },
766 | "node_modules/y18n": {
767 | "version": "5.0.8",
768 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
769 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
770 | "engines": {
771 | "node": ">=10"
772 | }
773 | },
774 | "node_modules/yargs": {
775 | "version": "16.2.0",
776 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
777 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
778 | "dependencies": {
779 | "cliui": "^7.0.2",
780 | "escalade": "^3.1.1",
781 | "get-caller-file": "^2.0.5",
782 | "require-directory": "^2.1.1",
783 | "string-width": "^4.2.0",
784 | "y18n": "^5.0.5",
785 | "yargs-parser": "^20.2.2"
786 | },
787 | "engines": {
788 | "node": ">=10"
789 | }
790 | },
791 | "node_modules/yargs-parser": {
792 | "version": "20.2.4",
793 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz",
794 | "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==",
795 | "engines": {
796 | "node": ">=10"
797 | }
798 | },
799 | "node_modules/yargs-unparser": {
800 | "version": "2.0.0",
801 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz",
802 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==",
803 | "dependencies": {
804 | "camelcase": "^6.0.0",
805 | "decamelize": "^4.0.0",
806 | "flat": "^5.0.2",
807 | "is-plain-obj": "^2.1.0"
808 | },
809 | "engines": {
810 | "node": ">=10"
811 | }
812 | },
813 | "node_modules/yocto-queue": {
814 | "version": "0.1.0",
815 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
816 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
817 | "engines": {
818 | "node": ">=10"
819 | },
820 | "funding": {
821 | "url": "https://github.com/sponsors/sindresorhus"
822 | }
823 | }
824 | },
825 | "dependencies": {
826 | "ansi-colors": {
827 | "version": "4.1.1",
828 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
829 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA=="
830 | },
831 | "ansi-regex": {
832 | "version": "5.0.1",
833 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
834 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="
835 | },
836 | "ansi-styles": {
837 | "version": "4.3.0",
838 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
839 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
840 | "requires": {
841 | "color-convert": "^2.0.1"
842 | }
843 | },
844 | "anymatch": {
845 | "version": "3.1.3",
846 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
847 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
848 | "requires": {
849 | "normalize-path": "^3.0.0",
850 | "picomatch": "^2.0.4"
851 | }
852 | },
853 | "argparse": {
854 | "version": "2.0.1",
855 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
856 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
857 | },
858 | "balanced-match": {
859 | "version": "1.0.2",
860 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
861 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
862 | },
863 | "binary-extensions": {
864 | "version": "2.2.0",
865 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
866 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA=="
867 | },
868 | "brace-expansion": {
869 | "version": "2.0.1",
870 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
871 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
872 | "requires": {
873 | "balanced-match": "^1.0.0"
874 | }
875 | },
876 | "braces": {
877 | "version": "3.0.2",
878 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
879 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
880 | "requires": {
881 | "fill-range": "^7.0.1"
882 | }
883 | },
884 | "browser-stdout": {
885 | "version": "1.3.1",
886 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
887 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw=="
888 | },
889 | "camelcase": {
890 | "version": "6.3.0",
891 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
892 | "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA=="
893 | },
894 | "chalk": {
895 | "version": "4.1.2",
896 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
897 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
898 | "requires": {
899 | "ansi-styles": "^4.1.0",
900 | "supports-color": "^7.1.0"
901 | },
902 | "dependencies": {
903 | "supports-color": {
904 | "version": "7.2.0",
905 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
906 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
907 | "requires": {
908 | "has-flag": "^4.0.0"
909 | }
910 | }
911 | }
912 | },
913 | "chokidar": {
914 | "version": "3.5.3",
915 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
916 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
917 | "requires": {
918 | "anymatch": "~3.1.2",
919 | "braces": "~3.0.2",
920 | "fsevents": "~2.3.2",
921 | "glob-parent": "~5.1.2",
922 | "is-binary-path": "~2.1.0",
923 | "is-glob": "~4.0.1",
924 | "normalize-path": "~3.0.0",
925 | "readdirp": "~3.6.0"
926 | }
927 | },
928 | "cliui": {
929 | "version": "7.0.4",
930 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
931 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
932 | "requires": {
933 | "string-width": "^4.2.0",
934 | "strip-ansi": "^6.0.0",
935 | "wrap-ansi": "^7.0.0"
936 | }
937 | },
938 | "color-convert": {
939 | "version": "2.0.1",
940 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
941 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
942 | "requires": {
943 | "color-name": "~1.1.4"
944 | }
945 | },
946 | "color-name": {
947 | "version": "1.1.4",
948 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
949 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
950 | },
951 | "concat-map": {
952 | "version": "0.0.1",
953 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
954 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
955 | },
956 | "debug": {
957 | "version": "4.3.4",
958 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
959 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
960 | "requires": {
961 | "ms": "2.1.2"
962 | },
963 | "dependencies": {
964 | "ms": {
965 | "version": "2.1.2",
966 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
967 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
968 | }
969 | }
970 | },
971 | "decamelize": {
972 | "version": "4.0.0",
973 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz",
974 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ=="
975 | },
976 | "diff": {
977 | "version": "5.0.0",
978 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz",
979 | "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w=="
980 | },
981 | "emoji-regex": {
982 | "version": "8.0.0",
983 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
984 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
985 | },
986 | "escalade": {
987 | "version": "3.1.1",
988 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
989 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw=="
990 | },
991 | "escape-string-regexp": {
992 | "version": "4.0.0",
993 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
994 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="
995 | },
996 | "fill-range": {
997 | "version": "7.0.1",
998 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
999 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
1000 | "requires": {
1001 | "to-regex-range": "^5.0.1"
1002 | }
1003 | },
1004 | "find-up": {
1005 | "version": "5.0.0",
1006 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
1007 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
1008 | "requires": {
1009 | "locate-path": "^6.0.0",
1010 | "path-exists": "^4.0.0"
1011 | }
1012 | },
1013 | "flat": {
1014 | "version": "5.0.2",
1015 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz",
1016 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ=="
1017 | },
1018 | "fs.realpath": {
1019 | "version": "1.0.0",
1020 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
1021 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
1022 | },
1023 | "get-caller-file": {
1024 | "version": "2.0.5",
1025 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
1026 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
1027 | },
1028 | "glob": {
1029 | "version": "7.2.0",
1030 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
1031 | "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
1032 | "requires": {
1033 | "fs.realpath": "^1.0.0",
1034 | "inflight": "^1.0.4",
1035 | "inherits": "2",
1036 | "minimatch": "^3.0.4",
1037 | "once": "^1.3.0",
1038 | "path-is-absolute": "^1.0.0"
1039 | },
1040 | "dependencies": {
1041 | "brace-expansion": {
1042 | "version": "1.1.11",
1043 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
1044 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
1045 | "requires": {
1046 | "balanced-match": "^1.0.0",
1047 | "concat-map": "0.0.1"
1048 | }
1049 | },
1050 | "minimatch": {
1051 | "version": "3.1.2",
1052 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
1053 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
1054 | "requires": {
1055 | "brace-expansion": "^1.1.7"
1056 | }
1057 | }
1058 | }
1059 | },
1060 | "glob-parent": {
1061 | "version": "5.1.2",
1062 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
1063 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
1064 | "requires": {
1065 | "is-glob": "^4.0.1"
1066 | }
1067 | },
1068 | "has-flag": {
1069 | "version": "4.0.0",
1070 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
1071 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
1072 | },
1073 | "he": {
1074 | "version": "1.2.0",
1075 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
1076 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="
1077 | },
1078 | "inflight": {
1079 | "version": "1.0.6",
1080 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
1081 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
1082 | "requires": {
1083 | "once": "^1.3.0",
1084 | "wrappy": "1"
1085 | }
1086 | },
1087 | "inherits": {
1088 | "version": "2.0.4",
1089 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
1090 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
1091 | },
1092 | "is-binary-path": {
1093 | "version": "2.1.0",
1094 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
1095 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
1096 | "requires": {
1097 | "binary-extensions": "^2.0.0"
1098 | }
1099 | },
1100 | "is-extglob": {
1101 | "version": "2.1.1",
1102 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
1103 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="
1104 | },
1105 | "is-fullwidth-code-point": {
1106 | "version": "3.0.0",
1107 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
1108 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
1109 | },
1110 | "is-glob": {
1111 | "version": "4.0.3",
1112 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
1113 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
1114 | "requires": {
1115 | "is-extglob": "^2.1.1"
1116 | }
1117 | },
1118 | "is-number": {
1119 | "version": "7.0.0",
1120 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
1121 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
1122 | },
1123 | "is-plain-obj": {
1124 | "version": "2.1.0",
1125 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",
1126 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA=="
1127 | },
1128 | "is-unicode-supported": {
1129 | "version": "0.1.0",
1130 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz",
1131 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw=="
1132 | },
1133 | "js-yaml": {
1134 | "version": "4.1.0",
1135 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
1136 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
1137 | "requires": {
1138 | "argparse": "^2.0.1"
1139 | }
1140 | },
1141 | "locate-path": {
1142 | "version": "6.0.0",
1143 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
1144 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
1145 | "requires": {
1146 | "p-locate": "^5.0.0"
1147 | }
1148 | },
1149 | "log-symbols": {
1150 | "version": "4.1.0",
1151 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",
1152 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",
1153 | "requires": {
1154 | "chalk": "^4.1.0",
1155 | "is-unicode-supported": "^0.1.0"
1156 | }
1157 | },
1158 | "minimatch": {
1159 | "version": "5.0.1",
1160 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz",
1161 | "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==",
1162 | "requires": {
1163 | "brace-expansion": "^2.0.1"
1164 | }
1165 | },
1166 | "mocha": {
1167 | "version": "10.2.0",
1168 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz",
1169 | "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==",
1170 | "requires": {
1171 | "ansi-colors": "4.1.1",
1172 | "browser-stdout": "1.3.1",
1173 | "chokidar": "3.5.3",
1174 | "debug": "4.3.4",
1175 | "diff": "5.0.0",
1176 | "escape-string-regexp": "4.0.0",
1177 | "find-up": "5.0.0",
1178 | "glob": "7.2.0",
1179 | "he": "1.2.0",
1180 | "js-yaml": "4.1.0",
1181 | "log-symbols": "4.1.0",
1182 | "minimatch": "5.0.1",
1183 | "ms": "2.1.3",
1184 | "nanoid": "3.3.3",
1185 | "serialize-javascript": "6.0.0",
1186 | "strip-json-comments": "3.1.1",
1187 | "supports-color": "8.1.1",
1188 | "workerpool": "6.2.1",
1189 | "yargs": "16.2.0",
1190 | "yargs-parser": "20.2.4",
1191 | "yargs-unparser": "2.0.0"
1192 | }
1193 | },
1194 | "ms": {
1195 | "version": "2.1.3",
1196 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
1197 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
1198 | },
1199 | "nanoid": {
1200 | "version": "3.3.3",
1201 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz",
1202 | "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w=="
1203 | },
1204 | "normalize-path": {
1205 | "version": "3.0.0",
1206 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
1207 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
1208 | },
1209 | "once": {
1210 | "version": "1.4.0",
1211 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
1212 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
1213 | "requires": {
1214 | "wrappy": "1"
1215 | }
1216 | },
1217 | "p-limit": {
1218 | "version": "3.1.0",
1219 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
1220 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
1221 | "requires": {
1222 | "yocto-queue": "^0.1.0"
1223 | }
1224 | },
1225 | "p-locate": {
1226 | "version": "5.0.0",
1227 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
1228 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
1229 | "requires": {
1230 | "p-limit": "^3.0.2"
1231 | }
1232 | },
1233 | "path-exists": {
1234 | "version": "4.0.0",
1235 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
1236 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="
1237 | },
1238 | "path-is-absolute": {
1239 | "version": "1.0.1",
1240 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
1241 | "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg=="
1242 | },
1243 | "picomatch": {
1244 | "version": "2.3.1",
1245 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
1246 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="
1247 | },
1248 | "randombytes": {
1249 | "version": "2.1.0",
1250 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
1251 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
1252 | "requires": {
1253 | "safe-buffer": "^5.1.0"
1254 | }
1255 | },
1256 | "readdirp": {
1257 | "version": "3.6.0",
1258 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
1259 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
1260 | "requires": {
1261 | "picomatch": "^2.2.1"
1262 | }
1263 | },
1264 | "require-directory": {
1265 | "version": "2.1.1",
1266 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
1267 | "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q=="
1268 | },
1269 | "safe-buffer": {
1270 | "version": "5.2.1",
1271 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
1272 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
1273 | },
1274 | "serialize-javascript": {
1275 | "version": "6.0.0",
1276 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz",
1277 | "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==",
1278 | "requires": {
1279 | "randombytes": "^2.1.0"
1280 | }
1281 | },
1282 | "string-width": {
1283 | "version": "4.2.3",
1284 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
1285 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
1286 | "requires": {
1287 | "emoji-regex": "^8.0.0",
1288 | "is-fullwidth-code-point": "^3.0.0",
1289 | "strip-ansi": "^6.0.1"
1290 | }
1291 | },
1292 | "strip-ansi": {
1293 | "version": "6.0.1",
1294 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
1295 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
1296 | "requires": {
1297 | "ansi-regex": "^5.0.1"
1298 | }
1299 | },
1300 | "strip-json-comments": {
1301 | "version": "3.1.1",
1302 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
1303 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="
1304 | },
1305 | "supports-color": {
1306 | "version": "8.1.1",
1307 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
1308 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
1309 | "requires": {
1310 | "has-flag": "^4.0.0"
1311 | }
1312 | },
1313 | "to-regex-range": {
1314 | "version": "5.0.1",
1315 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
1316 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
1317 | "requires": {
1318 | "is-number": "^7.0.0"
1319 | }
1320 | },
1321 | "workerpool": {
1322 | "version": "6.2.1",
1323 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz",
1324 | "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw=="
1325 | },
1326 | "wrap-ansi": {
1327 | "version": "7.0.0",
1328 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
1329 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
1330 | "requires": {
1331 | "ansi-styles": "^4.0.0",
1332 | "string-width": "^4.1.0",
1333 | "strip-ansi": "^6.0.0"
1334 | }
1335 | },
1336 | "wrappy": {
1337 | "version": "1.0.2",
1338 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
1339 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
1340 | },
1341 | "y18n": {
1342 | "version": "5.0.8",
1343 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
1344 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="
1345 | },
1346 | "yargs": {
1347 | "version": "16.2.0",
1348 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
1349 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
1350 | "requires": {
1351 | "cliui": "^7.0.2",
1352 | "escalade": "^3.1.1",
1353 | "get-caller-file": "^2.0.5",
1354 | "require-directory": "^2.1.1",
1355 | "string-width": "^4.2.0",
1356 | "y18n": "^5.0.5",
1357 | "yargs-parser": "^20.2.2"
1358 | }
1359 | },
1360 | "yargs-parser": {
1361 | "version": "20.2.4",
1362 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz",
1363 | "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA=="
1364 | },
1365 | "yargs-unparser": {
1366 | "version": "2.0.0",
1367 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz",
1368 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==",
1369 | "requires": {
1370 | "camelcase": "^6.0.0",
1371 | "decamelize": "^4.0.0",
1372 | "flat": "^5.0.2",
1373 | "is-plain-obj": "^2.1.0"
1374 | }
1375 | },
1376 | "yocto-queue": {
1377 | "version": "0.1.0",
1378 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
1379 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="
1380 | }
1381 | }
1382 | }
1383 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "anabolicset",
3 | "version": "1.4.1",
4 | "homepage": "https://colonelparrot.github.io/AnabolicSet/",
5 | "description": "Javascript Set on steroids.",
6 | "main": "src/anabolicset.js",
7 | "scripts": {
8 | "test": "mocha"
9 | },
10 | "repository": {
11 | "type": "git",
12 | "url": "https://github.com/ColonelParrot/AnabolicSet"
13 | },
14 | "keywords": [
15 | "js",
16 | "set",
17 | "data-structures"
18 | ],
19 | "author": "ColonelParrot",
20 | "license": "MIT",
21 | "dependencies": {
22 | "mocha": "^10.2.0"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/anabolicset.js:
--------------------------------------------------------------------------------
1 | /*! AnabolicSet v1.4.1 | (c) ColonelParrot and other contributors | MIT License */
2 |
3 | ; (function (global, factory) {
4 | typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
5 | typeof define === 'function' && define.amd ? define(factory) :
6 | global.AnabolicSet = factory()
7 | }(this, (function () {
8 | 'use strict';
9 | class AnabolicSet {
10 |
11 | /**
12 | * Initializes the AnabolicSet
13 | * @param {*} values the initial values in the set
14 | * @param {*} serializer the serializer function
15 | * @param {*} options options for the set
16 | */
17 | constructor(values, serializer, options) {
18 | if (serializer !== undefined) {
19 | this.setSerializer(serializer)
20 | } else {
21 | this.setSerializer((a) => a)
22 | }
23 |
24 | this.setValues(values)
25 |
26 | this.options = options || {}
27 | }
28 |
29 | /**
30 | * Set the values for the set, overwriting previous values
31 | * @param {*} values the values in the set
32 | */
33 | setValues(values) {
34 | const setArrayValues = (arr) => {
35 | this._values = arr.reduce((acc, curr) => {
36 | acc[this._serializer(curr)] = curr
37 | return acc
38 | }, {})
39 | }
40 | if (values !== undefined) {
41 | this.clear()
42 | if (Array.isArray(values)) {
43 | setArrayValues(values)
44 | } else {
45 | setArrayValues([values])
46 | }
47 | } else {
48 | this.clear()
49 | }
50 | }
51 |
52 | /**
53 | * Insert item into Set
54 | * @param {*} value item to be inserted
55 | */
56 | add(value) {
57 | if (value !== undefined) {
58 | this._values[this._serializer(value)] = value
59 | }
60 | }
61 |
62 | /**
63 | * Adds multiple rest parameters
64 | * @param {...any} values rest parameters
65 | */
66 | addAll(...values) {
67 | if (values !== undefined) {
68 | values.forEach(value => {
69 | this._values[this._serializer(value)] = value
70 | })
71 | }
72 | }
73 |
74 | /**
75 | * Clears all items in the AnabolicSet
76 | */
77 | clear() {
78 | this._values = {}
79 | }
80 |
81 | /**
82 | * Removes value from set
83 | * @param {*} value item to be removed
84 | */
85 | delete(value) {
86 | if (value !== undefined) {
87 | delete this._values[this._serializer(value)]
88 | }
89 | }
90 |
91 | /**
92 | * `[[value, value], [value2, value2]]`
93 | * @returns an array of the items in the Set in groups of 2
94 | */
95 | entries() {
96 | return Object.values(this._values).reduce((acc, curr) => {
97 | acc.push([curr, curr])
98 | return acc;
99 | }, [])
100 | }
101 |
102 | /**
103 | * Calls callback on each item in AnabolicSet
104 | * @param {*} callback callback function
105 | */
106 | forEach(callback) {
107 | Object.values(this._values).forEach(callback)
108 | }
109 |
110 | /**
111 | * Checks whether the AnabolicSet contains the value
112 | * @param {*} value
113 | * @returns `true` if contains, `false` otherwise
114 | */
115 | has(value) {
116 | return this._values.hasOwnProperty(this._serializer(value))
117 | }
118 |
119 | /**
120 | * Get items in AnabolicSet as an array
121 | * @returns an array of items
122 | */
123 | values() {
124 | return Object.values(this._values)
125 | }
126 |
127 | /**
128 | * Synonymous with {@link getValues()}
129 | * @returns an array of items
130 | */
131 | keys() {
132 | return this.getValues()
133 | }
134 |
135 | /**
136 | * Sets serializer function
137 | * @param {*} serializer serializer function
138 | */
139 | setSerializer(serializer) {
140 | this._serializer = serializer
141 | }
142 |
143 | /**
144 | * Applies union with another set
145 | * @param {*} set other set
146 | * @returns new AnabolicSet with union
147 | */
148 | union(set) {
149 | if (set !== undefined) {
150 | const values = { ...this._values }
151 | const setValues = { ...set._values }
152 | Object.values(setValues).forEach(val => {
153 | const key = this._serializer(val)
154 | values[key] = val;
155 | })
156 | return new AnabolicSet(Object.values(values), this._serializer)
157 | }
158 | }
159 |
160 | /**
161 | * Gets intersection between sets
162 | * @param {*} set
163 | * @returns array of intersections
164 | */
165 | intersect(set) {
166 | return this.values().reduce((acc, curr) => {
167 | if (set._values.hasOwnProperty(set._serializer(curr))) {
168 | acc.push(curr)
169 | }
170 | return acc
171 | }, [])
172 | }
173 |
174 | /**
175 | * Gets complement of set to parameter
176 | * @param {*} set
177 | * @returns array of complements
178 | */
179 | complement(set) {
180 | return this.values().reduce((acc, curr) => {
181 | if (!set._values.hasOwnProperty(set._serializer(curr))) {
182 | acc.push(curr)
183 | }
184 | return acc
185 | }, [])
186 | }
187 |
188 | /**
189 | * Checks if current set is a subset of parameter
190 | * @param {*} set
191 | * @returns `true` if is subset, `false` otherwise
192 | */
193 | isSubsetOf(set) {
194 | return this.complement(set).length == 0
195 | }
196 |
197 | /**
198 | * Checks if current set is a superset of parameter
199 | * @param {*} set
200 | * @returns `true` if is superset, `false` otherwise
201 | */
202 | isSupersetOf(set) {
203 | return set.isSubsetOf(this)
204 | }
205 |
206 | /**
207 | * Clones AnabolicSet
208 | * @returns new AnabolicSet with identical items & serializer
209 | */
210 | clone() {
211 | return new AnabolicSet({ ...this._values }, this._serializer)
212 | }
213 | }
214 |
215 | if(typeof module !== 'undefined'){
216 | module.exports = { AnabolicSet }
217 | }
218 | return AnabolicSet
219 | })));
--------------------------------------------------------------------------------
/test/tests.js:
--------------------------------------------------------------------------------
1 | /**
2 | * run with `npm test`
3 | */
4 |
5 | const assert = require('assert')
6 |
7 | const AnabolicSet = require('../src/anabolicset')
8 |
9 | function newSet(...rest) {
10 | return new AnabolicSet(...rest)
11 | }
12 |
13 | describe('constructor() test', () => {
14 | it('should handle empty array', () => {
15 | const set = newSet([])
16 | assert.deepEqual(set.values(), [])
17 | })
18 | it('should handle populated array', () => {
19 | const set = newSet([1, 2, 3, 3])
20 | assert.deepEqual(set.values(), [1, 2, 3])
21 | })
22 | it('should handle string serializer', () => {
23 | const set = newSet(['abc', 'acd', 'bce'], (str) => str[0])
24 | assert.deepEqual(set.values(), ['acd', 'bce'])
25 | })
26 | it('should handle object serializer', () => {
27 | const set = newSet([{ id: 1 }, { id: 2 }, { id: 2 }], (obj) => obj.id)
28 | assert.deepEqual(set.values(), [{ id: 1 }, { id: 2 }])
29 | })
30 | })
31 |
32 | describe('addAll() test', () => {
33 | it('should add multiple parameters', () => {
34 | const set = newSet([1, 2])
35 | set.addAll(2, 3, 4)
36 | assert.deepEqual(set.values(), [1, 2, 3, 4])
37 | })
38 | it('should handle spreaded array', () => {
39 | const set = newSet([1, 2])
40 | set.addAll(...[2, 3, 4])
41 | assert.deepEqual(set.values(), [1, 2, 3, 4])
42 | })
43 | })
44 |
45 | describe('setValues() test', () => {
46 | it('should set values', () => {
47 | const set = newSet([1, 2, 3, 4, 5])
48 | set.setValues([1, 2])
49 | assert.deepEqual(set.values(), [1, 2])
50 | })
51 | })
52 |
53 | describe('setSerializer() test', () => {
54 | it('should use serializer', () => {
55 | const set = newSet([])
56 | set.setSerializer((obj) => obj.id)
57 | set.addAll(...[{ id: 1 }, { id: 2 }, { id: 2 }])
58 | assert.deepEqual(set.values(), [{ id: 1 }, { id: 2 }])
59 | })
60 | })
61 |
62 | describe('union() test', () => {
63 | it('should combine distinct sets', () => {
64 | const set1 = newSet([1, 2])
65 | const set2 = newSet([3, 4])
66 | const result = set1.union(set2)
67 | assert.deepEqual(result.values(), [1, 2, 3, 4])
68 | })
69 | it('should handle overlapping values', () => {
70 | const set1 = newSet([1, 2])
71 | const set2 = newSet([2, 3])
72 | const result = set1.union(set2)
73 | assert.deepEqual(result.values(), [1, 2, 3])
74 | })
75 | it('should use serializer', () => {
76 | const set1 = newSet([{ id: 1 }, { id: 2 }], (obj) => obj.id)
77 | const set2 = newSet([{ id: 3 }, { id: 4 }], (obj) => obj.id)
78 | const result = set1.union(set2)
79 | assert.deepEqual(result.values(), [{ id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }])
80 | })
81 | })
82 |
83 | describe('intersect() test', () => {
84 | it('should find no intersection', () => {
85 | const set1 = newSet([1, 2])
86 | const set2 = newSet([3, 4])
87 | assert.deepEqual(set1.intersect(set2), [])
88 | })
89 | it('should find all intersection', () => {
90 | const set1 = newSet([1, 2])
91 | const set2 = newSet([2, 1])
92 | assert.deepEqual(set1.intersect(set2), [1, 2])
93 | })
94 | it('should find partial intersection', () => {
95 | const set1 = newSet([1, 2])
96 | const set2 = newSet([2, 3])
97 | assert.deepEqual(set1.intersect(set2), [2])
98 | })
99 | it('should use serializer', () => {
100 | const set1 = newSet([{ id: 1 }, { id: 2 }], (obj) => obj.id)
101 | const set2 = newSet([{ id: 2 }, { id: 3 }], (obj) => obj.id)
102 | assert.deepEqual(set1.intersect(set2), [{ id: 2 }])
103 | })
104 | })
105 |
106 | describe('complement() test', () => {
107 | it('should find no complements', () => {
108 | const set1 = newSet([1, 2])
109 | const set2 = newSet([2, 1])
110 | assert.deepEqual(set1.complement(set2), [])
111 | })
112 | it('should find all complements, both ways', () => {
113 | const set1 = newSet([1, 2])
114 | const set2 = newSet([3, 4])
115 | assert.deepEqual(set1.complement(set2), [1, 2])
116 | assert.deepEqual(set2.complement(set1), [3, 4])
117 | })
118 | it('should find partial complements', () => {
119 | const set1 = newSet([1, 2])
120 | const set2 = newSet([2, 3])
121 | assert.deepEqual(set1.complement(set2), [1])
122 | })
123 | it('should use serializer', () => {
124 | const set1 = newSet([{ id: 1 }, { id: 2 }], (obj) => obj.id)
125 | const set2 = newSet([{ id: 2 }, { id: 3 }], (obj) => obj.id)
126 | assert.deepEqual(set1.complement(set2), [{ id: 1 }])
127 | })
128 | })
129 |
130 | describe('isSubsetOf/isSupersetOf() test', () => {
131 | it('should find subset', () => {
132 | const set1 = newSet([1, 2, 3, 4])
133 | const set2 = newSet([2, 3])
134 | assert.equal(set2.isSubsetOf(set1), true)
135 | assert.equal(set1.isSupersetOf(set2), true)
136 | })
137 | it('should not find subset', () => {
138 | const set1 = newSet([1, 2, 3, 4])
139 | const set2 = newSet([5, 6])
140 | assert.equal(set2.isSubsetOf(set1), false)
141 | assert.equal(set1.isSupersetOf(set2), false)
142 | })
143 | it('should not find subset even with overlap', () => {
144 | const set1 = newSet([1, 2, 3, 4])
145 | const set2 = newSet([4, 5])
146 | assert.equal(set2.isSubsetOf(set1), false)
147 | assert.equal(set1.isSupersetOf(set2), false)
148 | })
149 | it('should use serializer', () => {
150 | const set1 = newSet([{ id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }], (obj) => obj.id)
151 | const set2 = newSet([{ id: 2 }, { id: 3 }], (obj) => obj.id)
152 | assert.equal(set2.isSubsetOf(set1), true)
153 | assert.equal(set1.isSupersetOf(set2), true)
154 | })
155 | })
--------------------------------------------------------------------------------