├── .github └── workflows │ └── node.js.yml ├── .gitignore ├── LICENSE ├── README.md ├── index.d.ts ├── index.js ├── package-lock.json ├── package.json ├── test ├── esmodule.mjs ├── require.js └── types.ts └── tsconfig.json /.github/workflows/node.js.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs 3 | 4 | name: Node.js CI 5 | 6 | on: 7 | push: 8 | branches: [ "master" ] 9 | pull_request: 10 | branches: [ "master" ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | strategy: 18 | matrix: 19 | node-version: [14.x, 16.x, 18.x, 19.x] 20 | # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ 21 | 22 | steps: 23 | - uses: actions/checkout@v3 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v3 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | cache: 'npm' 29 | - run: npm ci 30 | - run: npm run build --if-present 31 | - run: npm test 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # nyc test coverage 18 | .nyc_output 19 | 20 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 21 | .grunt 22 | 23 | # node-waf configuration 24 | .lock-wscript 25 | 26 | # Compiled binary addons (http://nodejs.org/api/addons.html) 27 | build/Release 28 | 29 | # Dependency directories 30 | node_modules 31 | jspm_packages 32 | 33 | # Optional npm cache directory 34 | .npm 35 | 36 | # Optional REPL history 37 | .node_repl_history 38 | 39 | /dist 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Ryan Patterson 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. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # node-callable-instance 2 | 3 | [![Build Status](https://img.shields.io/github/actions/workflow/status/CGamesPlay/node-callable-instance/node.js.yml?branch=master)](https://github.com/CGamesPlay/node-callable-instance/actions/workflows/node.js.yml) [![Download Size](https://img.shields.io/bundlephobia/min/callable-instance.svg?style=flat)](https://bundlephobia.com/package/callable-instance@latest) [![dependencies](https://img.shields.io/badge/dependencies-none-brightgreen)](https://www.npmjs.com/package/callable-instance?activeTab=dependencies) [![npm](https://img.shields.io/npm/v/callable-instance)](https://www.npmjs.com/package/callable-instance) [![npm](https://img.shields.io/npm/dw/callable-instance)](https://www.npmjs.com/package/callable-instance) 4 | 5 | This module allows you to create an ES6 class that is callable as a function. The invocation is sent to one of the object's normal prototype methods. 6 | 7 | ## Installation 8 | 9 | ``` 10 | npm install callable-instance 11 | ``` 12 | 13 | ## Usage 14 | 15 | In the following example, we will create an `ExampleClass` class. The instances have all of the normal properties and methods, but are actually functions as well. 16 | 17 | ```javascript 18 | import CallableInstance from "callable-instance"; 19 | // If you aren't using ES modules, you can use require: 20 | // var CallableInstance = require("callable-instance"); 21 | 22 | class ExampleClass extends CallableInstance { 23 | constructor() { 24 | // CallableInstance accepts the name of the property to use as the callable 25 | // method. 26 | super("instanceMethod"); 27 | } 28 | 29 | instanceMethod() { 30 | console.log("instanceMethod called!"); 31 | } 32 | } 33 | 34 | var test = new ExampleClass(); 35 | // Invoke the method normally 36 | test.instanceMethod(); 37 | // Call the instance itself, redirects to instanceMethod 38 | test(); 39 | // The instance is actually a closure bound to itself and can be used like a 40 | // normal function. 41 | test.apply(null, [1, 2, 3]); 42 | ``` 43 | 44 | TypeScript is also supported. `CallableInstance` is generic, accepting a tuple of arguments and a return type. 45 | 46 | ```typescript 47 | import CallableInstance from "callable-instance"; 48 | 49 | class ExampleClass extends CallableInstance<[number], string> { 50 | constructor() { 51 | super("instanceMethod"); 52 | } 53 | 54 | instanceMethod(input: number): string { 55 | return `${input}`; 56 | } 57 | } 58 | ``` 59 | 60 | Note that the types specified may differ from the argument and return value types of the target method; this is an error due to a limitation of TypeScript. 61 | 62 | 63 | ### Inherited Properties 64 | 65 | All instances of CallableMethod are also an instances of [Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function), and have all of Function's properties. 66 | 67 | Libraries that accept functions will expect that they behave as Function objects do. For example, if you alter the semantics of the `call` or `apply` methods, library code may fail to work with your callable instance. In these cases, you can simply bind the instance method to the callable instance and pass that instead (e.g. `test.instanceMethod.bind(test)`). 68 | 69 | This can also cause problems if your derived class wants to have a `name` or `length` property, which are built-in properties and not configurable by default. You can have your class disable the built-in descriptors of these properties to make them available for your use. 70 | 71 | ```javascript 72 | var test = new ExampleClass(); 73 | test.name = "hello!"; 74 | console.log(test.name); // Will print 'instanceMethod' 75 | 76 | class NameableClass extends CallableInstance { 77 | constructor() { 78 | super("instanceMethod"); 79 | Object.defineProperty(this, "name", { 80 | value: void 0, 81 | enumerable: true, 82 | writeable: true, 83 | configurable: true, 84 | }); 85 | } 86 | 87 | instanceMethod() { 88 | console.log(this.name); 89 | } 90 | } 91 | 92 | test = new NameableClass(); 93 | test.name = "hello!"; 94 | console.log(test.name); // Will print 'hello!' 95 | ``` 96 | 97 | ## Contributing 98 | 99 | 1. Fork it! 100 | 2. Create your feature branch: `git checkout -b my-new-feature` 101 | 3. Commit your changes: `git commit -am 'Add some feature'` 102 | 4. Push to the branch: `git push origin my-new-feature` 103 | 5. Submit a pull request :D 104 | 105 | ## Credits 106 | 107 | Information for the implementation came from [this StackOverflow answer](http://stackoverflow.com/a/36871498/123899). 108 | 109 | ## License 110 | 111 | Distributed under the MIT license. 112 | -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- 1 | type Func = (...argv: Args) => Return; 2 | interface ICallableInstance { 3 | // prettier-ignore 4 | new (property: string | symbol): 5 | Func; 6 | } 7 | declare const CallableInstance: ICallableInstance; 8 | export = CallableInstance; 9 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | function CallableInstance(property) { 2 | var func = this.constructor.prototype[property]; 3 | var apply = function () { 4 | return func.apply(apply, arguments); 5 | }; 6 | Object.setPrototypeOf(apply, this.constructor.prototype); 7 | Object.getOwnPropertyNames(func).forEach(function (p) { 8 | Object.defineProperty(apply, p, Object.getOwnPropertyDescriptor(func, p)); 9 | }); 10 | return apply; 11 | } 12 | CallableInstance.prototype = Object.create(Function.prototype); 13 | 14 | module.exports = CallableInstance; 15 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "callable-instance", 3 | "version": "2.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "callable-instance", 9 | "version": "2.0.0", 10 | "license": "MIT", 11 | "devDependencies": { 12 | "@types/mocha": "^10.0.1", 13 | "mocha": "^10.2.0", 14 | "prettier": "^2.8.1", 15 | "ts-expect": "^1.3.0", 16 | "typescript": "^4.9.4" 17 | } 18 | }, 19 | "node_modules/@types/mocha": { 20 | "version": "10.0.1", 21 | "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", 22 | "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", 23 | "dev": true 24 | }, 25 | "node_modules/ansi-colors": { 26 | "version": "4.1.1", 27 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", 28 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", 29 | "dev": true, 30 | "engines": { 31 | "node": ">=6" 32 | } 33 | }, 34 | "node_modules/ansi-regex": { 35 | "version": "5.0.1", 36 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 37 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 38 | "dev": true, 39 | "engines": { 40 | "node": ">=8" 41 | } 42 | }, 43 | "node_modules/ansi-styles": { 44 | "version": "4.3.0", 45 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 46 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 47 | "dev": true, 48 | "dependencies": { 49 | "color-convert": "^2.0.1" 50 | }, 51 | "engines": { 52 | "node": ">=8" 53 | }, 54 | "funding": { 55 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 56 | } 57 | }, 58 | "node_modules/anymatch": { 59 | "version": "3.1.3", 60 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", 61 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", 62 | "dev": true, 63 | "dependencies": { 64 | "normalize-path": "^3.0.0", 65 | "picomatch": "^2.0.4" 66 | }, 67 | "engines": { 68 | "node": ">= 8" 69 | } 70 | }, 71 | "node_modules/argparse": { 72 | "version": "2.0.1", 73 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 74 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 75 | "dev": true 76 | }, 77 | "node_modules/balanced-match": { 78 | "version": "1.0.2", 79 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 80 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 81 | "dev": true 82 | }, 83 | "node_modules/binary-extensions": { 84 | "version": "2.2.0", 85 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 86 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 87 | "dev": true, 88 | "engines": { 89 | "node": ">=8" 90 | } 91 | }, 92 | "node_modules/brace-expansion": { 93 | "version": "2.0.1", 94 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 95 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 96 | "dev": true, 97 | "dependencies": { 98 | "balanced-match": "^1.0.0" 99 | } 100 | }, 101 | "node_modules/braces": { 102 | "version": "3.0.2", 103 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 104 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 105 | "dev": true, 106 | "dependencies": { 107 | "fill-range": "^7.0.1" 108 | }, 109 | "engines": { 110 | "node": ">=8" 111 | } 112 | }, 113 | "node_modules/browser-stdout": { 114 | "version": "1.3.1", 115 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 116 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 117 | "dev": true 118 | }, 119 | "node_modules/camelcase": { 120 | "version": "6.3.0", 121 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", 122 | "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", 123 | "dev": true, 124 | "engines": { 125 | "node": ">=10" 126 | }, 127 | "funding": { 128 | "url": "https://github.com/sponsors/sindresorhus" 129 | } 130 | }, 131 | "node_modules/chalk": { 132 | "version": "4.1.2", 133 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 134 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 135 | "dev": true, 136 | "dependencies": { 137 | "ansi-styles": "^4.1.0", 138 | "supports-color": "^7.1.0" 139 | }, 140 | "engines": { 141 | "node": ">=10" 142 | }, 143 | "funding": { 144 | "url": "https://github.com/chalk/chalk?sponsor=1" 145 | } 146 | }, 147 | "node_modules/chalk/node_modules/supports-color": { 148 | "version": "7.2.0", 149 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 150 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 151 | "dev": true, 152 | "dependencies": { 153 | "has-flag": "^4.0.0" 154 | }, 155 | "engines": { 156 | "node": ">=8" 157 | } 158 | }, 159 | "node_modules/chokidar": { 160 | "version": "3.5.3", 161 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", 162 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", 163 | "dev": true, 164 | "funding": [ 165 | { 166 | "type": "individual", 167 | "url": "https://paulmillr.com/funding/" 168 | } 169 | ], 170 | "dependencies": { 171 | "anymatch": "~3.1.2", 172 | "braces": "~3.0.2", 173 | "glob-parent": "~5.1.2", 174 | "is-binary-path": "~2.1.0", 175 | "is-glob": "~4.0.1", 176 | "normalize-path": "~3.0.0", 177 | "readdirp": "~3.6.0" 178 | }, 179 | "engines": { 180 | "node": ">= 8.10.0" 181 | }, 182 | "optionalDependencies": { 183 | "fsevents": "~2.3.2" 184 | } 185 | }, 186 | "node_modules/cliui": { 187 | "version": "7.0.4", 188 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 189 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 190 | "dev": true, 191 | "dependencies": { 192 | "string-width": "^4.2.0", 193 | "strip-ansi": "^6.0.0", 194 | "wrap-ansi": "^7.0.0" 195 | } 196 | }, 197 | "node_modules/color-convert": { 198 | "version": "2.0.1", 199 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 200 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 201 | "dev": true, 202 | "dependencies": { 203 | "color-name": "~1.1.4" 204 | }, 205 | "engines": { 206 | "node": ">=7.0.0" 207 | } 208 | }, 209 | "node_modules/color-name": { 210 | "version": "1.1.4", 211 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 212 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 213 | "dev": true 214 | }, 215 | "node_modules/concat-map": { 216 | "version": "0.0.1", 217 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 218 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", 219 | "dev": true 220 | }, 221 | "node_modules/debug": { 222 | "version": "4.3.4", 223 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 224 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 225 | "dev": true, 226 | "dependencies": { 227 | "ms": "2.1.2" 228 | }, 229 | "engines": { 230 | "node": ">=6.0" 231 | }, 232 | "peerDependenciesMeta": { 233 | "supports-color": { 234 | "optional": true 235 | } 236 | } 237 | }, 238 | "node_modules/debug/node_modules/ms": { 239 | "version": "2.1.2", 240 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 241 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 242 | "dev": true 243 | }, 244 | "node_modules/decamelize": { 245 | "version": "4.0.0", 246 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", 247 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", 248 | "dev": true, 249 | "engines": { 250 | "node": ">=10" 251 | }, 252 | "funding": { 253 | "url": "https://github.com/sponsors/sindresorhus" 254 | } 255 | }, 256 | "node_modules/diff": { 257 | "version": "5.0.0", 258 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", 259 | "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", 260 | "dev": true, 261 | "engines": { 262 | "node": ">=0.3.1" 263 | } 264 | }, 265 | "node_modules/emoji-regex": { 266 | "version": "8.0.0", 267 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 268 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 269 | "dev": true 270 | }, 271 | "node_modules/escalade": { 272 | "version": "3.1.1", 273 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 274 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 275 | "dev": true, 276 | "engines": { 277 | "node": ">=6" 278 | } 279 | }, 280 | "node_modules/escape-string-regexp": { 281 | "version": "4.0.0", 282 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 283 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 284 | "dev": true, 285 | "engines": { 286 | "node": ">=10" 287 | }, 288 | "funding": { 289 | "url": "https://github.com/sponsors/sindresorhus" 290 | } 291 | }, 292 | "node_modules/fill-range": { 293 | "version": "7.0.1", 294 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 295 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 296 | "dev": true, 297 | "dependencies": { 298 | "to-regex-range": "^5.0.1" 299 | }, 300 | "engines": { 301 | "node": ">=8" 302 | } 303 | }, 304 | "node_modules/find-up": { 305 | "version": "5.0.0", 306 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 307 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 308 | "dev": true, 309 | "dependencies": { 310 | "locate-path": "^6.0.0", 311 | "path-exists": "^4.0.0" 312 | }, 313 | "engines": { 314 | "node": ">=10" 315 | }, 316 | "funding": { 317 | "url": "https://github.com/sponsors/sindresorhus" 318 | } 319 | }, 320 | "node_modules/flat": { 321 | "version": "5.0.2", 322 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", 323 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", 324 | "dev": true, 325 | "bin": { 326 | "flat": "cli.js" 327 | } 328 | }, 329 | "node_modules/fs.realpath": { 330 | "version": "1.0.0", 331 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 332 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", 333 | "dev": true 334 | }, 335 | "node_modules/fsevents": { 336 | "version": "2.3.2", 337 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 338 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 339 | "dev": true, 340 | "hasInstallScript": true, 341 | "optional": true, 342 | "os": [ 343 | "darwin" 344 | ], 345 | "engines": { 346 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 347 | } 348 | }, 349 | "node_modules/get-caller-file": { 350 | "version": "2.0.5", 351 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 352 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 353 | "dev": true, 354 | "engines": { 355 | "node": "6.* || 8.* || >= 10.*" 356 | } 357 | }, 358 | "node_modules/glob": { 359 | "version": "7.2.0", 360 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", 361 | "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", 362 | "dev": true, 363 | "dependencies": { 364 | "fs.realpath": "^1.0.0", 365 | "inflight": "^1.0.4", 366 | "inherits": "2", 367 | "minimatch": "^3.0.4", 368 | "once": "^1.3.0", 369 | "path-is-absolute": "^1.0.0" 370 | }, 371 | "engines": { 372 | "node": "*" 373 | }, 374 | "funding": { 375 | "url": "https://github.com/sponsors/isaacs" 376 | } 377 | }, 378 | "node_modules/glob-parent": { 379 | "version": "5.1.2", 380 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 381 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 382 | "dev": true, 383 | "dependencies": { 384 | "is-glob": "^4.0.1" 385 | }, 386 | "engines": { 387 | "node": ">= 6" 388 | } 389 | }, 390 | "node_modules/glob/node_modules/brace-expansion": { 391 | "version": "1.1.11", 392 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 393 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 394 | "dev": true, 395 | "dependencies": { 396 | "balanced-match": "^1.0.0", 397 | "concat-map": "0.0.1" 398 | } 399 | }, 400 | "node_modules/glob/node_modules/minimatch": { 401 | "version": "3.1.2", 402 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 403 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 404 | "dev": true, 405 | "dependencies": { 406 | "brace-expansion": "^1.1.7" 407 | }, 408 | "engines": { 409 | "node": "*" 410 | } 411 | }, 412 | "node_modules/has-flag": { 413 | "version": "4.0.0", 414 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 415 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 416 | "dev": true, 417 | "engines": { 418 | "node": ">=8" 419 | } 420 | }, 421 | "node_modules/he": { 422 | "version": "1.2.0", 423 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 424 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 425 | "dev": true, 426 | "bin": { 427 | "he": "bin/he" 428 | } 429 | }, 430 | "node_modules/inflight": { 431 | "version": "1.0.6", 432 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 433 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", 434 | "dev": true, 435 | "dependencies": { 436 | "once": "^1.3.0", 437 | "wrappy": "1" 438 | } 439 | }, 440 | "node_modules/inherits": { 441 | "version": "2.0.4", 442 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 443 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 444 | "dev": true 445 | }, 446 | "node_modules/is-binary-path": { 447 | "version": "2.1.0", 448 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 449 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 450 | "dev": true, 451 | "dependencies": { 452 | "binary-extensions": "^2.0.0" 453 | }, 454 | "engines": { 455 | "node": ">=8" 456 | } 457 | }, 458 | "node_modules/is-extglob": { 459 | "version": "2.1.1", 460 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 461 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 462 | "dev": true, 463 | "engines": { 464 | "node": ">=0.10.0" 465 | } 466 | }, 467 | "node_modules/is-fullwidth-code-point": { 468 | "version": "3.0.0", 469 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 470 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 471 | "dev": true, 472 | "engines": { 473 | "node": ">=8" 474 | } 475 | }, 476 | "node_modules/is-glob": { 477 | "version": "4.0.3", 478 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 479 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 480 | "dev": true, 481 | "dependencies": { 482 | "is-extglob": "^2.1.1" 483 | }, 484 | "engines": { 485 | "node": ">=0.10.0" 486 | } 487 | }, 488 | "node_modules/is-number": { 489 | "version": "7.0.0", 490 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 491 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 492 | "dev": true, 493 | "engines": { 494 | "node": ">=0.12.0" 495 | } 496 | }, 497 | "node_modules/is-plain-obj": { 498 | "version": "2.1.0", 499 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", 500 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", 501 | "dev": true, 502 | "engines": { 503 | "node": ">=8" 504 | } 505 | }, 506 | "node_modules/is-unicode-supported": { 507 | "version": "0.1.0", 508 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", 509 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", 510 | "dev": true, 511 | "engines": { 512 | "node": ">=10" 513 | }, 514 | "funding": { 515 | "url": "https://github.com/sponsors/sindresorhus" 516 | } 517 | }, 518 | "node_modules/js-yaml": { 519 | "version": "4.1.0", 520 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 521 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 522 | "dev": true, 523 | "dependencies": { 524 | "argparse": "^2.0.1" 525 | }, 526 | "bin": { 527 | "js-yaml": "bin/js-yaml.js" 528 | } 529 | }, 530 | "node_modules/locate-path": { 531 | "version": "6.0.0", 532 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 533 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 534 | "dev": true, 535 | "dependencies": { 536 | "p-locate": "^5.0.0" 537 | }, 538 | "engines": { 539 | "node": ">=10" 540 | }, 541 | "funding": { 542 | "url": "https://github.com/sponsors/sindresorhus" 543 | } 544 | }, 545 | "node_modules/log-symbols": { 546 | "version": "4.1.0", 547 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", 548 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", 549 | "dev": true, 550 | "dependencies": { 551 | "chalk": "^4.1.0", 552 | "is-unicode-supported": "^0.1.0" 553 | }, 554 | "engines": { 555 | "node": ">=10" 556 | }, 557 | "funding": { 558 | "url": "https://github.com/sponsors/sindresorhus" 559 | } 560 | }, 561 | "node_modules/minimatch": { 562 | "version": "5.0.1", 563 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", 564 | "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", 565 | "dev": true, 566 | "dependencies": { 567 | "brace-expansion": "^2.0.1" 568 | }, 569 | "engines": { 570 | "node": ">=10" 571 | } 572 | }, 573 | "node_modules/mocha": { 574 | "version": "10.2.0", 575 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", 576 | "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", 577 | "dev": true, 578 | "dependencies": { 579 | "ansi-colors": "4.1.1", 580 | "browser-stdout": "1.3.1", 581 | "chokidar": "3.5.3", 582 | "debug": "4.3.4", 583 | "diff": "5.0.0", 584 | "escape-string-regexp": "4.0.0", 585 | "find-up": "5.0.0", 586 | "glob": "7.2.0", 587 | "he": "1.2.0", 588 | "js-yaml": "4.1.0", 589 | "log-symbols": "4.1.0", 590 | "minimatch": "5.0.1", 591 | "ms": "2.1.3", 592 | "nanoid": "3.3.3", 593 | "serialize-javascript": "6.0.0", 594 | "strip-json-comments": "3.1.1", 595 | "supports-color": "8.1.1", 596 | "workerpool": "6.2.1", 597 | "yargs": "16.2.0", 598 | "yargs-parser": "20.2.4", 599 | "yargs-unparser": "2.0.0" 600 | }, 601 | "bin": { 602 | "_mocha": "bin/_mocha", 603 | "mocha": "bin/mocha.js" 604 | }, 605 | "engines": { 606 | "node": ">= 14.0.0" 607 | }, 608 | "funding": { 609 | "type": "opencollective", 610 | "url": "https://opencollective.com/mochajs" 611 | } 612 | }, 613 | "node_modules/ms": { 614 | "version": "2.1.3", 615 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 616 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 617 | "dev": true 618 | }, 619 | "node_modules/nanoid": { 620 | "version": "3.3.3", 621 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", 622 | "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", 623 | "dev": true, 624 | "bin": { 625 | "nanoid": "bin/nanoid.cjs" 626 | }, 627 | "engines": { 628 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" 629 | } 630 | }, 631 | "node_modules/normalize-path": { 632 | "version": "3.0.0", 633 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 634 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 635 | "dev": true, 636 | "engines": { 637 | "node": ">=0.10.0" 638 | } 639 | }, 640 | "node_modules/once": { 641 | "version": "1.4.0", 642 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 643 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 644 | "dev": true, 645 | "dependencies": { 646 | "wrappy": "1" 647 | } 648 | }, 649 | "node_modules/p-limit": { 650 | "version": "3.1.0", 651 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 652 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 653 | "dev": true, 654 | "dependencies": { 655 | "yocto-queue": "^0.1.0" 656 | }, 657 | "engines": { 658 | "node": ">=10" 659 | }, 660 | "funding": { 661 | "url": "https://github.com/sponsors/sindresorhus" 662 | } 663 | }, 664 | "node_modules/p-locate": { 665 | "version": "5.0.0", 666 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 667 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 668 | "dev": true, 669 | "dependencies": { 670 | "p-limit": "^3.0.2" 671 | }, 672 | "engines": { 673 | "node": ">=10" 674 | }, 675 | "funding": { 676 | "url": "https://github.com/sponsors/sindresorhus" 677 | } 678 | }, 679 | "node_modules/path-exists": { 680 | "version": "4.0.0", 681 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 682 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 683 | "dev": true, 684 | "engines": { 685 | "node": ">=8" 686 | } 687 | }, 688 | "node_modules/path-is-absolute": { 689 | "version": "1.0.1", 690 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 691 | "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", 692 | "dev": true, 693 | "engines": { 694 | "node": ">=0.10.0" 695 | } 696 | }, 697 | "node_modules/picomatch": { 698 | "version": "2.3.1", 699 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 700 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 701 | "dev": true, 702 | "engines": { 703 | "node": ">=8.6" 704 | }, 705 | "funding": { 706 | "url": "https://github.com/sponsors/jonschlinkert" 707 | } 708 | }, 709 | "node_modules/prettier": { 710 | "version": "2.8.1", 711 | "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.1.tgz", 712 | "integrity": "sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==", 713 | "dev": true, 714 | "bin": { 715 | "prettier": "bin-prettier.js" 716 | }, 717 | "engines": { 718 | "node": ">=10.13.0" 719 | }, 720 | "funding": { 721 | "url": "https://github.com/prettier/prettier?sponsor=1" 722 | } 723 | }, 724 | "node_modules/randombytes": { 725 | "version": "2.1.0", 726 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 727 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 728 | "dev": true, 729 | "dependencies": { 730 | "safe-buffer": "^5.1.0" 731 | } 732 | }, 733 | "node_modules/readdirp": { 734 | "version": "3.6.0", 735 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 736 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 737 | "dev": true, 738 | "dependencies": { 739 | "picomatch": "^2.2.1" 740 | }, 741 | "engines": { 742 | "node": ">=8.10.0" 743 | } 744 | }, 745 | "node_modules/require-directory": { 746 | "version": "2.1.1", 747 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 748 | "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", 749 | "dev": true, 750 | "engines": { 751 | "node": ">=0.10.0" 752 | } 753 | }, 754 | "node_modules/safe-buffer": { 755 | "version": "5.2.1", 756 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 757 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 758 | "dev": true, 759 | "funding": [ 760 | { 761 | "type": "github", 762 | "url": "https://github.com/sponsors/feross" 763 | }, 764 | { 765 | "type": "patreon", 766 | "url": "https://www.patreon.com/feross" 767 | }, 768 | { 769 | "type": "consulting", 770 | "url": "https://feross.org/support" 771 | } 772 | ] 773 | }, 774 | "node_modules/serialize-javascript": { 775 | "version": "6.0.0", 776 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", 777 | "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", 778 | "dev": true, 779 | "dependencies": { 780 | "randombytes": "^2.1.0" 781 | } 782 | }, 783 | "node_modules/string-width": { 784 | "version": "4.2.3", 785 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 786 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 787 | "dev": true, 788 | "dependencies": { 789 | "emoji-regex": "^8.0.0", 790 | "is-fullwidth-code-point": "^3.0.0", 791 | "strip-ansi": "^6.0.1" 792 | }, 793 | "engines": { 794 | "node": ">=8" 795 | } 796 | }, 797 | "node_modules/strip-ansi": { 798 | "version": "6.0.1", 799 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 800 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 801 | "dev": true, 802 | "dependencies": { 803 | "ansi-regex": "^5.0.1" 804 | }, 805 | "engines": { 806 | "node": ">=8" 807 | } 808 | }, 809 | "node_modules/strip-json-comments": { 810 | "version": "3.1.1", 811 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 812 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 813 | "dev": true, 814 | "engines": { 815 | "node": ">=8" 816 | }, 817 | "funding": { 818 | "url": "https://github.com/sponsors/sindresorhus" 819 | } 820 | }, 821 | "node_modules/supports-color": { 822 | "version": "8.1.1", 823 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 824 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 825 | "dev": true, 826 | "dependencies": { 827 | "has-flag": "^4.0.0" 828 | }, 829 | "engines": { 830 | "node": ">=10" 831 | }, 832 | "funding": { 833 | "url": "https://github.com/chalk/supports-color?sponsor=1" 834 | } 835 | }, 836 | "node_modules/to-regex-range": { 837 | "version": "5.0.1", 838 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 839 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 840 | "dev": true, 841 | "dependencies": { 842 | "is-number": "^7.0.0" 843 | }, 844 | "engines": { 845 | "node": ">=8.0" 846 | } 847 | }, 848 | "node_modules/ts-expect": { 849 | "version": "1.3.0", 850 | "resolved": "https://registry.npmjs.org/ts-expect/-/ts-expect-1.3.0.tgz", 851 | "integrity": "sha512-e4g0EJtAjk64xgnFPD6kTBUtpnMVzDrMb12N1YZV0VvSlhnVT3SGxiYTLdGy8Q5cYHOIC/FAHmZ10eGrAguicQ==", 852 | "dev": true 853 | }, 854 | "node_modules/typescript": { 855 | "version": "4.9.4", 856 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", 857 | "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", 858 | "dev": true, 859 | "bin": { 860 | "tsc": "bin/tsc", 861 | "tsserver": "bin/tsserver" 862 | }, 863 | "engines": { 864 | "node": ">=4.2.0" 865 | } 866 | }, 867 | "node_modules/workerpool": { 868 | "version": "6.2.1", 869 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", 870 | "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", 871 | "dev": true 872 | }, 873 | "node_modules/wrap-ansi": { 874 | "version": "7.0.0", 875 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 876 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 877 | "dev": true, 878 | "dependencies": { 879 | "ansi-styles": "^4.0.0", 880 | "string-width": "^4.1.0", 881 | "strip-ansi": "^6.0.0" 882 | }, 883 | "engines": { 884 | "node": ">=10" 885 | }, 886 | "funding": { 887 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 888 | } 889 | }, 890 | "node_modules/wrappy": { 891 | "version": "1.0.2", 892 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 893 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", 894 | "dev": true 895 | }, 896 | "node_modules/y18n": { 897 | "version": "5.0.8", 898 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", 899 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", 900 | "dev": true, 901 | "engines": { 902 | "node": ">=10" 903 | } 904 | }, 905 | "node_modules/yargs": { 906 | "version": "16.2.0", 907 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 908 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 909 | "dev": true, 910 | "dependencies": { 911 | "cliui": "^7.0.2", 912 | "escalade": "^3.1.1", 913 | "get-caller-file": "^2.0.5", 914 | "require-directory": "^2.1.1", 915 | "string-width": "^4.2.0", 916 | "y18n": "^5.0.5", 917 | "yargs-parser": "^20.2.2" 918 | }, 919 | "engines": { 920 | "node": ">=10" 921 | } 922 | }, 923 | "node_modules/yargs-parser": { 924 | "version": "20.2.4", 925 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", 926 | "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", 927 | "dev": true, 928 | "engines": { 929 | "node": ">=10" 930 | } 931 | }, 932 | "node_modules/yargs-unparser": { 933 | "version": "2.0.0", 934 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", 935 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", 936 | "dev": true, 937 | "dependencies": { 938 | "camelcase": "^6.0.0", 939 | "decamelize": "^4.0.0", 940 | "flat": "^5.0.2", 941 | "is-plain-obj": "^2.1.0" 942 | }, 943 | "engines": { 944 | "node": ">=10" 945 | } 946 | }, 947 | "node_modules/yocto-queue": { 948 | "version": "0.1.0", 949 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 950 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 951 | "dev": true, 952 | "engines": { 953 | "node": ">=10" 954 | }, 955 | "funding": { 956 | "url": "https://github.com/sponsors/sindresorhus" 957 | } 958 | } 959 | }, 960 | "dependencies": { 961 | "@types/mocha": { 962 | "version": "10.0.1", 963 | "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", 964 | "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", 965 | "dev": true 966 | }, 967 | "ansi-colors": { 968 | "version": "4.1.1", 969 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", 970 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", 971 | "dev": true 972 | }, 973 | "ansi-regex": { 974 | "version": "5.0.1", 975 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 976 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 977 | "dev": true 978 | }, 979 | "ansi-styles": { 980 | "version": "4.3.0", 981 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 982 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 983 | "dev": true, 984 | "requires": { 985 | "color-convert": "^2.0.1" 986 | } 987 | }, 988 | "anymatch": { 989 | "version": "3.1.3", 990 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", 991 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", 992 | "dev": true, 993 | "requires": { 994 | "normalize-path": "^3.0.0", 995 | "picomatch": "^2.0.4" 996 | } 997 | }, 998 | "argparse": { 999 | "version": "2.0.1", 1000 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 1001 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 1002 | "dev": true 1003 | }, 1004 | "balanced-match": { 1005 | "version": "1.0.2", 1006 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 1007 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 1008 | "dev": true 1009 | }, 1010 | "binary-extensions": { 1011 | "version": "2.2.0", 1012 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 1013 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 1014 | "dev": true 1015 | }, 1016 | "brace-expansion": { 1017 | "version": "2.0.1", 1018 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 1019 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 1020 | "dev": true, 1021 | "requires": { 1022 | "balanced-match": "^1.0.0" 1023 | } 1024 | }, 1025 | "braces": { 1026 | "version": "3.0.2", 1027 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 1028 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 1029 | "dev": true, 1030 | "requires": { 1031 | "fill-range": "^7.0.1" 1032 | } 1033 | }, 1034 | "browser-stdout": { 1035 | "version": "1.3.1", 1036 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 1037 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 1038 | "dev": true 1039 | }, 1040 | "camelcase": { 1041 | "version": "6.3.0", 1042 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", 1043 | "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", 1044 | "dev": true 1045 | }, 1046 | "chalk": { 1047 | "version": "4.1.2", 1048 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 1049 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 1050 | "dev": true, 1051 | "requires": { 1052 | "ansi-styles": "^4.1.0", 1053 | "supports-color": "^7.1.0" 1054 | }, 1055 | "dependencies": { 1056 | "supports-color": { 1057 | "version": "7.2.0", 1058 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 1059 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 1060 | "dev": true, 1061 | "requires": { 1062 | "has-flag": "^4.0.0" 1063 | } 1064 | } 1065 | } 1066 | }, 1067 | "chokidar": { 1068 | "version": "3.5.3", 1069 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", 1070 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", 1071 | "dev": true, 1072 | "requires": { 1073 | "anymatch": "~3.1.2", 1074 | "braces": "~3.0.2", 1075 | "fsevents": "~2.3.2", 1076 | "glob-parent": "~5.1.2", 1077 | "is-binary-path": "~2.1.0", 1078 | "is-glob": "~4.0.1", 1079 | "normalize-path": "~3.0.0", 1080 | "readdirp": "~3.6.0" 1081 | } 1082 | }, 1083 | "cliui": { 1084 | "version": "7.0.4", 1085 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 1086 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 1087 | "dev": true, 1088 | "requires": { 1089 | "string-width": "^4.2.0", 1090 | "strip-ansi": "^6.0.0", 1091 | "wrap-ansi": "^7.0.0" 1092 | } 1093 | }, 1094 | "color-convert": { 1095 | "version": "2.0.1", 1096 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 1097 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 1098 | "dev": true, 1099 | "requires": { 1100 | "color-name": "~1.1.4" 1101 | } 1102 | }, 1103 | "color-name": { 1104 | "version": "1.1.4", 1105 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 1106 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 1107 | "dev": true 1108 | }, 1109 | "concat-map": { 1110 | "version": "0.0.1", 1111 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 1112 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", 1113 | "dev": true 1114 | }, 1115 | "debug": { 1116 | "version": "4.3.4", 1117 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 1118 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 1119 | "dev": true, 1120 | "requires": { 1121 | "ms": "2.1.2" 1122 | }, 1123 | "dependencies": { 1124 | "ms": { 1125 | "version": "2.1.2", 1126 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1127 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 1128 | "dev": true 1129 | } 1130 | } 1131 | }, 1132 | "decamelize": { 1133 | "version": "4.0.0", 1134 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", 1135 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", 1136 | "dev": true 1137 | }, 1138 | "diff": { 1139 | "version": "5.0.0", 1140 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", 1141 | "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", 1142 | "dev": true 1143 | }, 1144 | "emoji-regex": { 1145 | "version": "8.0.0", 1146 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 1147 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 1148 | "dev": true 1149 | }, 1150 | "escalade": { 1151 | "version": "3.1.1", 1152 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 1153 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 1154 | "dev": true 1155 | }, 1156 | "escape-string-regexp": { 1157 | "version": "4.0.0", 1158 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 1159 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 1160 | "dev": true 1161 | }, 1162 | "fill-range": { 1163 | "version": "7.0.1", 1164 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 1165 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 1166 | "dev": true, 1167 | "requires": { 1168 | "to-regex-range": "^5.0.1" 1169 | } 1170 | }, 1171 | "find-up": { 1172 | "version": "5.0.0", 1173 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 1174 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 1175 | "dev": true, 1176 | "requires": { 1177 | "locate-path": "^6.0.0", 1178 | "path-exists": "^4.0.0" 1179 | } 1180 | }, 1181 | "flat": { 1182 | "version": "5.0.2", 1183 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", 1184 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", 1185 | "dev": true 1186 | }, 1187 | "fs.realpath": { 1188 | "version": "1.0.0", 1189 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 1190 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", 1191 | "dev": true 1192 | }, 1193 | "fsevents": { 1194 | "version": "2.3.2", 1195 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 1196 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 1197 | "dev": true, 1198 | "optional": true 1199 | }, 1200 | "get-caller-file": { 1201 | "version": "2.0.5", 1202 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 1203 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 1204 | "dev": true 1205 | }, 1206 | "glob": { 1207 | "version": "7.2.0", 1208 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", 1209 | "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", 1210 | "dev": true, 1211 | "requires": { 1212 | "fs.realpath": "^1.0.0", 1213 | "inflight": "^1.0.4", 1214 | "inherits": "2", 1215 | "minimatch": "^3.0.4", 1216 | "once": "^1.3.0", 1217 | "path-is-absolute": "^1.0.0" 1218 | }, 1219 | "dependencies": { 1220 | "brace-expansion": { 1221 | "version": "1.1.11", 1222 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 1223 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 1224 | "dev": true, 1225 | "requires": { 1226 | "balanced-match": "^1.0.0", 1227 | "concat-map": "0.0.1" 1228 | } 1229 | }, 1230 | "minimatch": { 1231 | "version": "3.1.2", 1232 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 1233 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 1234 | "dev": true, 1235 | "requires": { 1236 | "brace-expansion": "^1.1.7" 1237 | } 1238 | } 1239 | } 1240 | }, 1241 | "glob-parent": { 1242 | "version": "5.1.2", 1243 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 1244 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 1245 | "dev": true, 1246 | "requires": { 1247 | "is-glob": "^4.0.1" 1248 | } 1249 | }, 1250 | "has-flag": { 1251 | "version": "4.0.0", 1252 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 1253 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 1254 | "dev": true 1255 | }, 1256 | "he": { 1257 | "version": "1.2.0", 1258 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 1259 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 1260 | "dev": true 1261 | }, 1262 | "inflight": { 1263 | "version": "1.0.6", 1264 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 1265 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", 1266 | "dev": true, 1267 | "requires": { 1268 | "once": "^1.3.0", 1269 | "wrappy": "1" 1270 | } 1271 | }, 1272 | "inherits": { 1273 | "version": "2.0.4", 1274 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 1275 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 1276 | "dev": true 1277 | }, 1278 | "is-binary-path": { 1279 | "version": "2.1.0", 1280 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 1281 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 1282 | "dev": true, 1283 | "requires": { 1284 | "binary-extensions": "^2.0.0" 1285 | } 1286 | }, 1287 | "is-extglob": { 1288 | "version": "2.1.1", 1289 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1290 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 1291 | "dev": true 1292 | }, 1293 | "is-fullwidth-code-point": { 1294 | "version": "3.0.0", 1295 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1296 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1297 | "dev": true 1298 | }, 1299 | "is-glob": { 1300 | "version": "4.0.3", 1301 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 1302 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 1303 | "dev": true, 1304 | "requires": { 1305 | "is-extglob": "^2.1.1" 1306 | } 1307 | }, 1308 | "is-number": { 1309 | "version": "7.0.0", 1310 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 1311 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 1312 | "dev": true 1313 | }, 1314 | "is-plain-obj": { 1315 | "version": "2.1.0", 1316 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", 1317 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", 1318 | "dev": true 1319 | }, 1320 | "is-unicode-supported": { 1321 | "version": "0.1.0", 1322 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", 1323 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", 1324 | "dev": true 1325 | }, 1326 | "js-yaml": { 1327 | "version": "4.1.0", 1328 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 1329 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 1330 | "dev": true, 1331 | "requires": { 1332 | "argparse": "^2.0.1" 1333 | } 1334 | }, 1335 | "locate-path": { 1336 | "version": "6.0.0", 1337 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 1338 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 1339 | "dev": true, 1340 | "requires": { 1341 | "p-locate": "^5.0.0" 1342 | } 1343 | }, 1344 | "log-symbols": { 1345 | "version": "4.1.0", 1346 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", 1347 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", 1348 | "dev": true, 1349 | "requires": { 1350 | "chalk": "^4.1.0", 1351 | "is-unicode-supported": "^0.1.0" 1352 | } 1353 | }, 1354 | "minimatch": { 1355 | "version": "5.0.1", 1356 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", 1357 | "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", 1358 | "dev": true, 1359 | "requires": { 1360 | "brace-expansion": "^2.0.1" 1361 | } 1362 | }, 1363 | "mocha": { 1364 | "version": "10.2.0", 1365 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", 1366 | "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", 1367 | "dev": true, 1368 | "requires": { 1369 | "ansi-colors": "4.1.1", 1370 | "browser-stdout": "1.3.1", 1371 | "chokidar": "3.5.3", 1372 | "debug": "4.3.4", 1373 | "diff": "5.0.0", 1374 | "escape-string-regexp": "4.0.0", 1375 | "find-up": "5.0.0", 1376 | "glob": "7.2.0", 1377 | "he": "1.2.0", 1378 | "js-yaml": "4.1.0", 1379 | "log-symbols": "4.1.0", 1380 | "minimatch": "5.0.1", 1381 | "ms": "2.1.3", 1382 | "nanoid": "3.3.3", 1383 | "serialize-javascript": "6.0.0", 1384 | "strip-json-comments": "3.1.1", 1385 | "supports-color": "8.1.1", 1386 | "workerpool": "6.2.1", 1387 | "yargs": "16.2.0", 1388 | "yargs-parser": "20.2.4", 1389 | "yargs-unparser": "2.0.0" 1390 | } 1391 | }, 1392 | "ms": { 1393 | "version": "2.1.3", 1394 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1395 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 1396 | "dev": true 1397 | }, 1398 | "nanoid": { 1399 | "version": "3.3.3", 1400 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", 1401 | "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", 1402 | "dev": true 1403 | }, 1404 | "normalize-path": { 1405 | "version": "3.0.0", 1406 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 1407 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 1408 | "dev": true 1409 | }, 1410 | "once": { 1411 | "version": "1.4.0", 1412 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1413 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 1414 | "dev": true, 1415 | "requires": { 1416 | "wrappy": "1" 1417 | } 1418 | }, 1419 | "p-limit": { 1420 | "version": "3.1.0", 1421 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 1422 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 1423 | "dev": true, 1424 | "requires": { 1425 | "yocto-queue": "^0.1.0" 1426 | } 1427 | }, 1428 | "p-locate": { 1429 | "version": "5.0.0", 1430 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 1431 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 1432 | "dev": true, 1433 | "requires": { 1434 | "p-limit": "^3.0.2" 1435 | } 1436 | }, 1437 | "path-exists": { 1438 | "version": "4.0.0", 1439 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 1440 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 1441 | "dev": true 1442 | }, 1443 | "path-is-absolute": { 1444 | "version": "1.0.1", 1445 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1446 | "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", 1447 | "dev": true 1448 | }, 1449 | "picomatch": { 1450 | "version": "2.3.1", 1451 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 1452 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 1453 | "dev": true 1454 | }, 1455 | "prettier": { 1456 | "version": "2.8.1", 1457 | "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.1.tgz", 1458 | "integrity": "sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==", 1459 | "dev": true 1460 | }, 1461 | "randombytes": { 1462 | "version": "2.1.0", 1463 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 1464 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 1465 | "dev": true, 1466 | "requires": { 1467 | "safe-buffer": "^5.1.0" 1468 | } 1469 | }, 1470 | "readdirp": { 1471 | "version": "3.6.0", 1472 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 1473 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 1474 | "dev": true, 1475 | "requires": { 1476 | "picomatch": "^2.2.1" 1477 | } 1478 | }, 1479 | "require-directory": { 1480 | "version": "2.1.1", 1481 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 1482 | "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", 1483 | "dev": true 1484 | }, 1485 | "safe-buffer": { 1486 | "version": "5.2.1", 1487 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1488 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1489 | "dev": true 1490 | }, 1491 | "serialize-javascript": { 1492 | "version": "6.0.0", 1493 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", 1494 | "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", 1495 | "dev": true, 1496 | "requires": { 1497 | "randombytes": "^2.1.0" 1498 | } 1499 | }, 1500 | "string-width": { 1501 | "version": "4.2.3", 1502 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 1503 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 1504 | "dev": true, 1505 | "requires": { 1506 | "emoji-regex": "^8.0.0", 1507 | "is-fullwidth-code-point": "^3.0.0", 1508 | "strip-ansi": "^6.0.1" 1509 | } 1510 | }, 1511 | "strip-ansi": { 1512 | "version": "6.0.1", 1513 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 1514 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 1515 | "dev": true, 1516 | "requires": { 1517 | "ansi-regex": "^5.0.1" 1518 | } 1519 | }, 1520 | "strip-json-comments": { 1521 | "version": "3.1.1", 1522 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 1523 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 1524 | "dev": true 1525 | }, 1526 | "supports-color": { 1527 | "version": "8.1.1", 1528 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 1529 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 1530 | "dev": true, 1531 | "requires": { 1532 | "has-flag": "^4.0.0" 1533 | } 1534 | }, 1535 | "to-regex-range": { 1536 | "version": "5.0.1", 1537 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1538 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1539 | "dev": true, 1540 | "requires": { 1541 | "is-number": "^7.0.0" 1542 | } 1543 | }, 1544 | "ts-expect": { 1545 | "version": "1.3.0", 1546 | "resolved": "https://registry.npmjs.org/ts-expect/-/ts-expect-1.3.0.tgz", 1547 | "integrity": "sha512-e4g0EJtAjk64xgnFPD6kTBUtpnMVzDrMb12N1YZV0VvSlhnVT3SGxiYTLdGy8Q5cYHOIC/FAHmZ10eGrAguicQ==", 1548 | "dev": true 1549 | }, 1550 | "typescript": { 1551 | "version": "4.9.4", 1552 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", 1553 | "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", 1554 | "dev": true 1555 | }, 1556 | "workerpool": { 1557 | "version": "6.2.1", 1558 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", 1559 | "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", 1560 | "dev": true 1561 | }, 1562 | "wrap-ansi": { 1563 | "version": "7.0.0", 1564 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 1565 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 1566 | "dev": true, 1567 | "requires": { 1568 | "ansi-styles": "^4.0.0", 1569 | "string-width": "^4.1.0", 1570 | "strip-ansi": "^6.0.0" 1571 | } 1572 | }, 1573 | "wrappy": { 1574 | "version": "1.0.2", 1575 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1576 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", 1577 | "dev": true 1578 | }, 1579 | "y18n": { 1580 | "version": "5.0.8", 1581 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", 1582 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", 1583 | "dev": true 1584 | }, 1585 | "yargs": { 1586 | "version": "16.2.0", 1587 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 1588 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 1589 | "dev": true, 1590 | "requires": { 1591 | "cliui": "^7.0.2", 1592 | "escalade": "^3.1.1", 1593 | "get-caller-file": "^2.0.5", 1594 | "require-directory": "^2.1.1", 1595 | "string-width": "^4.2.0", 1596 | "y18n": "^5.0.5", 1597 | "yargs-parser": "^20.2.2" 1598 | } 1599 | }, 1600 | "yargs-parser": { 1601 | "version": "20.2.4", 1602 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", 1603 | "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", 1604 | "dev": true 1605 | }, 1606 | "yargs-unparser": { 1607 | "version": "2.0.0", 1608 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", 1609 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", 1610 | "dev": true, 1611 | "requires": { 1612 | "camelcase": "^6.0.0", 1613 | "decamelize": "^4.0.0", 1614 | "flat": "^5.0.2", 1615 | "is-plain-obj": "^2.1.0" 1616 | } 1617 | }, 1618 | "yocto-queue": { 1619 | "version": "0.1.0", 1620 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 1621 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 1622 | "dev": true 1623 | } 1624 | } 1625 | } 1626 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "callable-instance", 3 | "version": "2.0.0", 4 | "description": "Instances of classes which are directly callable as functions.", 5 | "repository": "CGamesPlay/node-callable-instance", 6 | "main": "index.js", 7 | "types": "index.d.ts", 8 | "scripts": { 9 | "test": "mocha && tsc" 10 | }, 11 | "keywords": [ 12 | "instance", 13 | "function", 14 | "object", 15 | "class", 16 | "callable" 17 | ], 18 | "bugs": { 19 | "url": "https://github.com/CGamesPlay/node-callable-instance/issues" 20 | }, 21 | "author": "Ryan Patterson", 22 | "license": "MIT", 23 | "devDependencies": { 24 | "@types/mocha": "^10.0.1", 25 | "mocha": "^10.2.0", 26 | "prettier": "^2.8.1", 27 | "ts-expect": "^1.3.0", 28 | "typescript": "^4.9.4" 29 | }, 30 | "files": [ 31 | "index.js", 32 | "index.d.ts", 33 | "LICENSE", 34 | "README.md" 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /test/esmodule.mjs: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import CallableInstance from "../index.js"; 3 | 4 | class MyTest extends CallableInstance { 5 | constructor(message) { 6 | super("go"); 7 | this.message = message; 8 | } 9 | 10 | go(arg) { 11 | return arg || this.message; 12 | } 13 | } 14 | 15 | describe("CallableInstance (mjs)", function () { 16 | it("is callable", function () { 17 | assert(new MyTest("testing")() === "testing"); 18 | assert(new MyTest()("arg") === "arg"); 19 | }); 20 | 21 | it("is an object", function () { 22 | assert(new MyTest("testing").go() === "testing"); 23 | }); 24 | 25 | it("is an instance of MyTest", function () { 26 | assert(new MyTest("testing") instanceof MyTest); 27 | assert(new MyTest("testing") instanceof CallableInstance); 28 | assert(new MyTest("testing") instanceof Function); 29 | assert(new MyTest("testing") instanceof Object); 30 | }); 31 | 32 | it("is a function", function () { 33 | assert(typeof new MyTest("testing") === "function"); 34 | }); 35 | 36 | it("copies the name property", function () { 37 | assert(new MyTest("testing").name === "go"); 38 | }); 39 | 40 | it("copies the length property", function () { 41 | assert(new MyTest("testing").length === 1); 42 | }); 43 | }); 44 | -------------------------------------------------------------------------------- /test/require.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var assert = require("assert"); 4 | var CallableInstance = require("../index"); 5 | 6 | class MyTest extends CallableInstance { 7 | constructor(message) { 8 | super("go"); 9 | this.message = message; 10 | } 11 | 12 | go(arg) { 13 | return arg || this.message; 14 | } 15 | } 16 | 17 | describe("CallableInstance (require)", function () { 18 | it("is callable", function () { 19 | assert(new MyTest("testing")() === "testing"); 20 | assert(new MyTest()("arg") === "arg"); 21 | }); 22 | 23 | it("is an object", function () { 24 | assert(new MyTest("testing").go() === "testing"); 25 | }); 26 | 27 | it("is an instance of MyTest", function () { 28 | assert(new MyTest("testing") instanceof MyTest); 29 | assert(new MyTest("testing") instanceof CallableInstance); 30 | assert(new MyTest("testing") instanceof Function); 31 | assert(new MyTest("testing") instanceof Object); 32 | }); 33 | 34 | it("is a function", function () { 35 | assert(typeof new MyTest("testing") === "function"); 36 | }); 37 | 38 | it("copies the name property", function () { 39 | assert(new MyTest("testing").name === "go"); 40 | }); 41 | 42 | it("copies the length property", function () { 43 | assert(new MyTest("testing").length === 1); 44 | }); 45 | }); 46 | -------------------------------------------------------------------------------- /test/types.ts: -------------------------------------------------------------------------------- 1 | import { expectType } from "ts-expect"; 2 | 3 | import CallableInstance from "../index.js"; 4 | 5 | class Repeater extends CallableInstance<[string], string> { 6 | constructor(public count: number) { 7 | super("go"); 8 | } 9 | 10 | go(arg: string): string { 11 | return arg.repeat(this.count); 12 | } 13 | } 14 | 15 | describe("CallableInstance (TypeScript)", function () { 16 | it("is callable", function () { 17 | expectType<(x: string) => string>(new Repeater(1)); 18 | // @ts-expect-error wrong type for constructor 19 | new Repeater("testing"); 20 | // @ts-expect-error wrong type for method 21 | new Repeater(5).go(5); 22 | // Valid propert access. 23 | new Repeater(5).count = 4; 24 | }); 25 | 26 | it("is an object", function () { 27 | expectType(new Repeater(5)); 28 | expectType<(x: string) => string>(new Repeater(5).go); 29 | }); 30 | 31 | it("is an instance of Repeater", function () { 32 | expectType(new Repeater(5)); 33 | //expectType(new Repeater(5)); 34 | expectType(new Repeater(5)); 35 | expectType(new Repeater(5)); 36 | }); 37 | }); 38 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig to read more about this file */ 4 | 5 | /* Projects */ 6 | // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ 7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 8 | // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ 9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ 10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 12 | 13 | /* Language and Environment */ 14 | "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, 15 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 16 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 17 | // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ 18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ 20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ 22 | // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ 23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 25 | // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ 26 | 27 | /* Modules */ 28 | "module": "commonjs" /* Specify what module code is generated. */, 29 | // "rootDir": "./", /* Specify the root folder within your source files. */ 30 | // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ 31 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 32 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 33 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 34 | // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ 35 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 36 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 37 | // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ 38 | // "resolveJsonModule": true, /* Enable importing .json files. */ 39 | // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ 40 | 41 | /* JavaScript Support */ 42 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ 43 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 44 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ 45 | 46 | /* Emit */ 47 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 48 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 49 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 50 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 51 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ 52 | // "outDir": "./", /* Specify an output folder for all emitted files. */ 53 | // "removeComments": true, /* Disable emitting comments. */ 54 | "noEmit": true /* Disable emitting files from a compilation. */, 55 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 56 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ 57 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 58 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 59 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 60 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 61 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 62 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 63 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 64 | // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ 65 | // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ 66 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 67 | // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ 68 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 69 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ 70 | 71 | /* Interop Constraints */ 72 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 73 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 74 | "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, 75 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 76 | "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, 77 | 78 | /* Type Checking */ 79 | "strict": true /* Enable all strict type-checking options. */, 80 | // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ 81 | // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ 82 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 83 | // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ 84 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 85 | // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ 86 | // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ 87 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 88 | // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ 89 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ 90 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 91 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 92 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 93 | // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ 94 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 95 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ 96 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 97 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 98 | 99 | /* Completeness */ 100 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 101 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 102 | } 103 | } 104 | --------------------------------------------------------------------------------