diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 000000000..83b464624 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,55 @@ +module.exports = { + env: { + browser: true, + es2021: true, + node: true + }, + extends: ['eslint:recommended'], + parserOptions: { + ecmaVersion: 12, + sourceType: 'module' + }, + ignorePatterns: ['*.generated.js'], + rules: {}, + overrides: [ + { + files: ['*.js', '*.cjs', '*.mjs'], + extends: [ + 'standard' + ] + }, + { + files: ['*.test.js'], + plugins: ['mocha'], + extends: [ + 'standard', + 'plugin:mocha/recommended' + ], + rules: { + 'mocha/no-skipped-tests': 'error', + 'mocha/no-exclusive-tests': 'error', + 'mocha/no-setup-in-describe': 'off', + 'mocha/no-identical-title': 'off' // TODO: Remove this + } + }, + { + files: ['types/*.ts'], + extends: [ + 'plugin:@typescript-eslint/recommended', + 'plugin:prettier/recommended' // this should come last + ], + rules: { + '@typescript-eslint/no-unused-vars': [ + 'error', + { argsIgnorePattern: '^_', varsIgnorePattern: '^_' } + ] + }, + plugins: ['@typescript-eslint'], + parserOptions: { + ecmaVersion: 12, + sourceType: 'module', + project: 'types/tsconfig.json' + } + } + ] +} diff --git a/.gitignore b/.gitignore index e461c6128..f84885168 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ _site node_modules .nyc_output /coverage +.eslintcache lib *.generated.js diff --git a/.prettierrc.cjs b/.prettierrc.cjs new file mode 100644 index 000000000..35fcafaf2 --- /dev/null +++ b/.prettierrc.cjs @@ -0,0 +1,4 @@ +module.exports = { + semi: false, + singleQuote: true, +} diff --git a/package-lock.json b/package-lock.json index 54855a425..d3d440d11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.17.9", + "@types/mocha": "^9.1.1", "complex.js": "^2.1.1", "decimal.js": "^10.3.1", "escape-latex": "^1.2.0", @@ -29,6 +30,8 @@ "@babel/preset-env": "7.16.11", "@babel/register": "7.17.7", "@types/assert": "^1.5.6", + "@typescript-eslint/eslint-plugin": "^5.20.0", + "@typescript-eslint/parser": "^5.20.0", "assert": "2.0.0", "babel-loader": "8.2.4", "benchmark": "2.1.4", @@ -36,6 +39,14 @@ "core-js": "3.22.0", "del": "6.0.0", "dtslint": "4.2.1", + "eslint": "^8.13.0", + "eslint-config-prettier": "^8.5.0", + "eslint-config-standard": "^17.0.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-mocha": "^10.0.4", + "eslint-plugin-n": "^15.1.0", + "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-promise": "^6.0.0", "expect-type": "^0.13.0", "expr-eval": "2.0.2", "fancy-log": "2.0.0", @@ -62,8 +73,8 @@ "numericjs": "1.2.6", "nyc": "15.1.0", "pad-right": "0.2.2", + "prettier": "^2.6.2", "process": "0.11.10", - "standard": "16.0.4", "sylvester": "0.0.21", "ts-node": "10.7.0", "typescript": "4.6.3", @@ -74,6 +85,9 @@ "node": ">= 12" } }, + "github.com:ChristopherChudzicki/eslint-config-standard-with-typescript.git": { + "extraneous": true + }, "node_modules/@ampproject/remapping": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", @@ -1805,33 +1819,38 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.3.0.tgz", - "integrity": "sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz", + "integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", + "debug": "^4.3.2", + "espree": "^9.3.1", + "globals": "^13.9.0", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "lodash": "^4.17.20", + "js-yaml": "^4.1.0", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", + "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", "dev": true, "dependencies": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" }, "engines": { "node": ">=8" @@ -1840,15 +1859,50 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@eslint/eslintrc/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, "engines": { - "node": ">= 4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", + "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1955,12 +2009,12 @@ } }, "node_modules/@nodelib/fs.scandir": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", - "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "dependencies": { - "@nodelib/fs.stat": "2.0.3", + "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" }, "engines": { @@ -1968,21 +2022,21 @@ } }, "node_modules/@nodelib/fs.stat": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", - "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, "engines": { "node": ">= 8" } }, "node_modules/@nodelib/fs.walk": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz", - "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "dependencies": { - "@nodelib/fs.scandir": "2.1.3", + "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" }, "engines": { @@ -2067,6 +2121,11 @@ "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, + "node_modules/@types/mocha": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==" + }, "node_modules/@types/node": { "version": "14.17.4", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.4.tgz", @@ -2079,6 +2138,328 @@ "integrity": "sha512-FwAQwMRbkhx0J6YELkwIpciVzCcgEqXEbIrIn3a2P5d3kGEHQ3wVhlN3YdVepYP+bZzCYO6OjmD4o9TGOZ40rA==", "dev": true }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.20.0.tgz", + "integrity": "sha512-fapGzoxilCn3sBtC6NtXZX6+P/Hef7VDbyfGqTTpzYydwhlkevB+0vE0EnmHPVTVSy68GUncyJ/2PcrFBeCo5Q==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.20.0", + "@typescript-eslint/type-utils": "5.20.0", + "@typescript-eslint/utils": "5.20.0", + "debug": "^4.3.2", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.1.8", + "regexpp": "^3.2.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@typescript-eslint/parser": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.20.0.tgz", + "integrity": "sha512-UWKibrCZQCYvobmu3/N8TWbEeo/EPQbS41Ux1F9XqPzGuV7pfg6n50ZrFo6hryynD8qOTTfLHtHjjdQtxJ0h/w==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.20.0", + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/typescript-estree": "5.20.0", + "debug": "^4.3.2" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.20.0.tgz", + "integrity": "sha512-h9KtuPZ4D/JuX7rpp1iKg3zOH0WNEa+ZIXwpW/KWmEFDxlA/HSfCMhiyF1HS/drTICjIbpA6OqkAhrP/zkCStg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/visitor-keys": "5.20.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.20.0.tgz", + "integrity": "sha512-WxNrCwYB3N/m8ceyoGCgbLmuZwupvzN0rE8NBuwnl7APgjv24ZJIjkNzoFBXPRCGzLNkoU/WfanW0exvp/+3Iw==", + "dev": true, + "dependencies": { + "@typescript-eslint/utils": "5.20.0", + "debug": "^4.3.2", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.20.0.tgz", + "integrity": "sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.20.0.tgz", + "integrity": "sha512-36xLjP/+bXusLMrT9fMMYy1KJAGgHhlER2TqpUVDYUQg4w0q/NW/sg4UGAgVwAqb8V4zYg43KMUpM8vV2lve6w==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/visitor-keys": "5.20.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@typescript-eslint/utils": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.20.0.tgz", + "integrity": "sha512-lHONGJL1LIO12Ujyx8L8xKbwWSkoUKFSO+0wDAqGXiudWB2EO7WEUT+YZLtVbmOmSllAjLb9tpoIPwpRe5Tn6w==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.20.0", + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/typescript-estree": "5.20.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.20.0.tgz", + "integrity": "sha512-1flRpNF+0CAQkMNlTJ6L/Z5jiODG/e5+7mk6XwtPOUS3UrTz3UOiAg9jG2VtKsWI6rZQfy4C6a232QNRZTRGlg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.20.0", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@ungap/promise-all-settled": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", @@ -2292,9 +2673,9 @@ } }, "node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -2831,32 +3212,15 @@ } }, "node_modules/array.prototype.flat": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz", - "integrity": "sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", + "integrity": "sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flatmap": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.2.4.tgz", - "integrity": "sha512-r9Z0zYoxqHz60vvQbWEdXIEtCwHF0yxaWfno9qzXeNHvfyl3BZqygmGzb84dsubyaXLH4husF+NFgMSdpZhk2Q==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1", - "function-bind": "^1.1.1" + "es-abstract": "^1.19.2", + "es-shim-unscopables": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -2922,15 +3286,6 @@ "node": ">=0.10.0" } }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/async": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", @@ -5765,27 +6120,6 @@ "node": ">=4.3.0 <5.0.0 || >=5.10" } }, - "node_modules/enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "dependencies": { - "ansi-colors": "^4.1.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/enquirer/node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/ent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", @@ -5814,9 +6148,9 @@ } }, "node_modules/es-abstract": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", - "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.5.tgz", + "integrity": "sha512-Aa2G2+Rd3b6kxEUKTF4TaW67czBLyAv3z7VOhYRU50YBx+bbsYZ9xQP4lMNazePuFlybXI0V4MruPos7qUo5fA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", @@ -5825,15 +6159,15 @@ "get-intrinsic": "^1.1.1", "get-symbol-description": "^1.0.0", "has": "^1.0.3", - "has-symbols": "^1.0.2", + "has-symbols": "^1.0.3", "internal-slot": "^1.0.3", "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", + "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", + "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-weakref": "^1.0.1", - "object-inspect": "^1.11.0", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", "string.prototype.trimend": "^1.0.4", @@ -5847,6 +6181,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + } + }, "node_modules/es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", @@ -6013,46 +6356,44 @@ } }, "node_modules/eslint": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.18.0.tgz", - "integrity": "sha512-fbgTiE8BfUJZuBeq2Yi7J3RB3WGUQ9PNuNbmgi6jt9Iv8qrkxfy19Ds3OpL1Pm7zg3BtTVhvcUZbIRQ0wmSjAQ==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.13.0.tgz", + "integrity": "sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.3.0", + "@eslint/eslintrc": "^1.2.1", + "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.2.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", + "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^6.0.0", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", + "glob-parent": "^6.0.1", + "globals": "^13.6.0", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.20", + "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^6.0.4", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, @@ -6060,42 +6401,28 @@ "eslint": "bin/eslint.js" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-config-standard": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz", - "integrity": "sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==", + "node_modules/eslint-config-prettier": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", + "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, "peerDependencies": { - "eslint": "^7.12.1", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^4.2.1 || ^5.0.0" + "eslint": ">=7.0.0" } }, - "node_modules/eslint-config-standard-jsx": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-10.0.0.tgz", - "integrity": "sha512-hLeA2f5e06W1xyr/93/QJulN/rLbUVUmqTlexv9PRKHFwEC9ffJcH2LvJhMoEqYQBEYafedgGZXH2W8NUpt5lA==", + "node_modules/eslint-config-standard": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz", + "integrity": "sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==", "dev": true, "funding": [ { @@ -6112,8 +6439,10 @@ } ], "peerDependencies": { - "eslint": "^7.12.1", - "eslint-plugin-react": "^7.21.5" + "eslint": "^8.0.1", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-n": "^15.0.0", + "eslint-plugin-promise": "^6.0.0" } }, "node_modules/eslint-import-resolver-node": { @@ -6135,28 +6464,14 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-import-resolver-node/node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, - "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/eslint-module-utils": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.1.tgz", - "integrity": "sha512-fjoetBXQZq2tSTWZ9yWVl2KuFrTZZH3V+9iD1V1RfpDgxzJR+mPd/KZmMiA8gbPqdBzpNiEHOuT7IYEWxrH0zQ==", + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz", + "integrity": "sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==", "dev": true, "dependencies": { "debug": "^3.2.7", - "find-up": "^2.1.0", - "pkg-dir": "^2.0.0" + "find-up": "^2.1.0" }, "engines": { "node": ">=4" @@ -6229,64 +6544,31 @@ "node": ">=4" } }, - "node_modules/eslint-module-utils/node_modules/pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "dependencies": { - "find-up": "^2.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-es": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", - "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", - "dev": true, - "dependencies": { - "eslint-utils": "^2.0.0", - "regexpp": "^3.0.0" - }, - "engines": { - "node": ">=8.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=4.19.1" - } - }, "node_modules/eslint-plugin-import": { - "version": "2.24.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.24.2.tgz", - "integrity": "sha512-hNVtyhiEtZmpsabL4neEj+6M5DCLgpYyG9nzJY8lZQeQXEn5UPW1DpUdsMHMXsq98dbNm7nt1w9ZMSVpfJdi8Q==", + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz", + "integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==", "dev": true, "dependencies": { - "array-includes": "^3.1.3", - "array.prototype.flat": "^1.2.4", + "array-includes": "^3.1.4", + "array.prototype.flat": "^1.2.5", "debug": "^2.6.9", "doctrine": "^2.1.0", "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.6.2", - "find-up": "^2.0.0", + "eslint-module-utils": "^2.7.3", "has": "^1.0.3", - "is-core-module": "^2.6.0", - "minimatch": "^3.0.4", - "object.values": "^1.1.4", - "pkg-up": "^2.0.0", - "read-pkg-up": "^3.0.0", - "resolve": "^1.20.0", - "tsconfig-paths": "^3.11.0" + "is-core-module": "^2.8.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.5", + "resolve": "^1.22.0", + "tsconfig-paths": "^3.14.1" }, "engines": { "node": ">=4" }, "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" } }, "node_modules/eslint-plugin-import/node_modules/debug": { @@ -6310,44 +6592,16 @@ "node": ">=0.10.0" } }, - "node_modules/eslint-plugin-import/node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "node_modules/eslint-plugin-import/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "locate-path": "^2.0.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" + "node": "*" } }, "node_modules/eslint-plugin-import/node_modules/ms": { @@ -6356,143 +6610,181 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, - "node_modules/eslint-plugin-import/node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "node_modules/eslint-plugin-mocha": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.0.4.tgz", + "integrity": "sha512-8wzAeepVY027oBHz/TmBmUr7vhVqoC1KTFeDybFLhbaWKx+aQ7fJJVuUsqcUy+L+G+XvgQBJY+cbAf7hl5DF7Q==", "dev": true, "dependencies": { - "p-try": "^1.0.0" + "eslint-utils": "^3.0.0", + "ramda": "^0.28.0" }, "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "dependencies": { - "p-limit": "^1.1.0" + "node": ">=14.0.0" }, - "engines": { - "node": ">=4" + "peerDependencies": { + "eslint": ">=7.0.0" } }, - "node_modules/eslint-plugin-import/node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/path-type": { + "node_modules/eslint-plugin-mocha/node_modules/eslint-utils": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, "dependencies": { - "pify": "^3.0.0" + "eslint-visitor-keys": "^2.0.0" }, "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "dependencies": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "dev": true, - "dependencies": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, - "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" } }, - "node_modules/eslint-plugin-import/node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "node_modules/eslint-plugin-mocha/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true, "engines": { - "node": ">=4" + "node": ">=10" } }, - "node_modules/eslint-plugin-node": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", - "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", + "node_modules/eslint-plugin-n": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.1.0.tgz", + "integrity": "sha512-Tgx4Z58QXv2Ha7Qzp0u4wavnZNZ3AOievZMxrAxi7nvDbzD5B/JqOD80LHYcGHFZc2HD9jDmM/+KWMPov46a4A==", "dev": true, "dependencies": { - "eslint-plugin-es": "^3.0.0", - "eslint-utils": "^2.0.0", + "builtins": "^4.0.0", + "eslint-plugin-es": "^4.1.0", + "eslint-utils": "^3.0.0", "ignore": "^5.1.1", + "is-core-module": "^2.3.0", "minimatch": "^3.0.4", "resolve": "^1.10.1", - "semver": "^6.1.0" + "semver": "^6.3.0" + }, + "engines": { + "node": ">=12.22.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-n/node_modules/builtins": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-4.1.0.tgz", + "integrity": "sha512-1bPRZQtmKaO6h7qV1YHXNtr6nCK28k0Zo95KM4dXfILcZZwoHJBN1m3lfLv9LPkcOZlrSr+J1bzMaZFO98Yq0w==", + "dev": true, + "dependencies": { + "semver": "^7.0.0" + } + }, + "node_modules/eslint-plugin-n/node_modules/builtins/node_modules/semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-n/node_modules/eslint-plugin-es": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", + "integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==", + "dev": true, + "dependencies": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" }, "engines": { "node": ">=8.10.0" }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, "peerDependencies": { - "eslint": ">=5.16.0" + "eslint": ">=4.19.1" } }, - "node_modules/eslint-plugin-node/node_modules/semver": { + "node_modules/eslint-plugin-n/node_modules/eslint-plugin-es/node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-plugin-n/node_modules/eslint-plugin-es/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-n/node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-plugin-n/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-n/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-n/node_modules/semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", @@ -6501,77 +6793,43 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-n/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/eslint-plugin-prettier": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz", + "integrity": "sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==", + "dev": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "peerDependencies": { + "eslint": ">=7.28.0", + "prettier": ">=2.0.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } + } + }, "node_modules/eslint-plugin-promise": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-5.1.1.tgz", - "integrity": "sha512-XgdcdyNzHfmlQyweOPTxmc7pIsS6dE4MvwhXWMQ2Dxs1XAL2GJDilUsjWen6TWik0aSI+zD/PqocZBblcm9rdA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz", + "integrity": "sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==", "dev": true, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "peerDependencies": { - "eslint": "^7.0.0" - } - }, - "node_modules/eslint-plugin-react": { - "version": "7.25.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.25.3.tgz", - "integrity": "sha512-ZMbFvZ1WAYSZKY662MBVEWR45VaBT6KSJCiupjrNlcdakB90juaZeDCbJq19e73JZQubqFtgETohwgAt8u5P6w==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.3", - "array.prototype.flatmap": "^1.2.4", - "doctrine": "^2.1.0", - "estraverse": "^5.2.0", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.0.4", - "object.entries": "^1.1.4", - "object.fromentries": "^2.0.4", - "object.hasown": "^1.0.0", - "object.values": "^1.1.4", - "prop-types": "^15.7.2", - "resolve": "^2.0.0-next.3", - "string.prototype.matchall": "^4.0.5" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7" - } - }, - "node_modules/eslint-plugin-react/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-react/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/eslint-plugin-react/node_modules/resolve": { - "version": "2.0.0-next.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz", - "integrity": "sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q==", - "dev": true, - "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "eslint": "^7.0.0 || ^8.0.0" } }, "node_modules/eslint-scope": { @@ -6596,43 +6854,19 @@ "node": ">=4.0" } }, - "node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, "engines": { - "node": ">=10" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/eslint/node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { "node": ">=8" @@ -6653,6 +6887,12 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/eslint/node_modules/chalk": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", @@ -6687,19 +6927,92 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/eslint/node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, - "node_modules/eslint/node_modules/globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { - "type-fest": "^0.8.1" + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/globals": { + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", + "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" }, "engines": { "node": ">=8" @@ -6717,13 +7030,16 @@ "node": ">=8" } }, - "node_modules/eslint/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "engines": { - "node": ">= 4" + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, "node_modules/eslint/node_modules/levn": { @@ -6739,18 +7055,6 @@ "node": ">= 0.8.0" } }, - "node_modules/eslint/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/eslint/node_modules/optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -6777,28 +7081,13 @@ "node": ">= 0.8.0" } }, - "node_modules/eslint/node_modules/semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/eslint/node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" @@ -6828,33 +7117,30 @@ "node": ">= 0.8.0" } }, - "node_modules/eslint/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "node_modules/eslint/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, - "dependencies": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "node_modules/espree": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", + "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", "dev": true, + "dependencies": { + "acorn": "^8.7.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^3.3.0" + }, "engines": { - "node": ">=4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/esprima": { @@ -6871,9 +7157,9 @@ } }, "node_modules/esquery": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", - "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -6883,9 +7169,9 @@ } }, "node_modules/esquery/node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "engines": { "node": ">=4.0" @@ -7205,21 +7491,26 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "node_modules/fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, "node_modules/fast-glob": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz", - "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==", + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.0", + "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.2", - "picomatch": "^2.2.1" + "micromatch": "^4.0.4" }, "engines": { - "node": ">=8" + "node": ">=8.6.0" } }, "node_modules/fast-json-stable-stringify": { @@ -7250,9 +7541,9 @@ "dev": true }, "node_modules/fastq": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.9.0.tgz", - "integrity": "sha512-i7FVWL8HhVY+CTkwFxkN2mk3h+787ixS5S63eb78diVRc1MCssarHq3W5cj0av7YDSwmaV928RNag+U1etRQ7w==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -7869,18 +8160,6 @@ "node": ">=8.0.0" } }, - "node_modules/get-stdin": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", - "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/get-symbol-description": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", @@ -8048,16 +8327,16 @@ } }, "node_modules/globby": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", - "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", "slash": "^3.0.0" }, "engines": { @@ -8285,9 +8564,9 @@ } }, "node_modules/has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, "engines": { "node": ">= 0.4" @@ -8622,9 +8901,9 @@ "dev": true }, "node_modules/ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true, "engines": { "node": ">= 4" @@ -8866,9 +9145,9 @@ } }, "node_modules/is-core-module": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", - "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -8997,9 +9276,9 @@ } }, "node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "dependencies": { "is-extglob": "^2.1.1" @@ -9034,9 +9313,9 @@ } }, "node_modules/is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true, "engines": { "node": ">= 0.4" @@ -9143,10 +9422,13 @@ "dev": true }, "node_modules/is-shared-array-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", - "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -9243,12 +9525,12 @@ } }, "node_modules/is-weakref": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.1.tgz", - "integrity": "sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.0" + "call-bind": "^1.0.2" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -9737,19 +10019,6 @@ "verror": "1.10.0" } }, - "node_modules/jsx-ast-utils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.1.0.tgz", - "integrity": "sha512-d4/UOjg+mxAWxCiF0c5UTSwyqbchkbqCvK87aBovhnh8GtysTjWmgC63tY0cJx/HzGgm9qnA147jVBdpOiQ2RA==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.1", - "object.assign": "^4.1.1" - }, - "engines": { - "node": ">=4.0" - } - }, "node_modules/just-debounce": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.0.0.tgz", @@ -10341,12 +10610,6 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", @@ -10359,10 +10622,10 @@ "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", "dev": true }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, "node_modules/log-symbols": { @@ -10393,18 +10656,6 @@ "node": ">=8.0" } }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -10681,16 +10932,16 @@ } }, "node_modules/micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.0.5" + "braces": "^3.0.2", + "picomatch": "^2.3.1" }, "engines": { - "node": ">=8" + "node": ">=8.6" } }, "node_modules/miller-rabin": { @@ -10770,9 +11021,9 @@ } }, "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, "node_modules/mississippi": { @@ -12160,9 +12411,9 @@ } }, "node_modules/object-inspect": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", - "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -12238,50 +12489,6 @@ "node": ">=0.10.0" } }, - "node_modules/object.entries": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz", - "integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz", - "integrity": "sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.hasown": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.0.tgz", - "integrity": "sha512-MhjYRfj3GBlhSkDHo6QmvgjRLXQ2zndabdf3nX0yTyZK9rPfxb6uRpAac8HXNLy1GpqWtZ81Qh4v3uOls2sRAg==", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/object.map": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", @@ -12664,9 +12871,9 @@ } }, "node_modules/path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, "node_modules/path-root": { @@ -12737,9 +12944,9 @@ "dev": true }, "node_modules/picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "engines": { "node": ">=8.6" @@ -12787,66 +12994,6 @@ "node": ">= 6" } }, - "node_modules/pkg-conf": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", - "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", - "dev": true, - "dependencies": { - "find-up": "^3.0.0", - "load-json-file": "^5.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/load-json-file": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", - "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.15", - "parse-json": "^4.0.0", - "pify": "^4.0.1", - "strip-bom": "^3.0.0", - "type-fest": "^0.3.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-conf/node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-conf/node_modules/type-fest": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/pkg-dir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", @@ -12859,76 +13006,6 @@ "node": ">=6" } }, - "node_modules/pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", - "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", - "dev": true, - "dependencies": { - "find-up": "^2.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-up/node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "dependencies": { - "locate-path": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-up/node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-up/node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "dependencies": { - "p-try": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-up/node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "dependencies": { - "p-limit": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-up/node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/platform": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz", @@ -12968,6 +13045,33 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", + "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/pretty-hrtime": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", @@ -13004,32 +13108,12 @@ "node": ">=8" } }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", "dev": true }, - "node_modules/prop-types": { - "version": "15.7.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", - "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", - "dev": true, - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.8.1" - } - }, "node_modules/prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -13154,6 +13238,36 @@ "node": ">=0.4.x" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ramda": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.28.0.tgz", + "integrity": "sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ramda" + } + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -13197,12 +13311,6 @@ "node": ">= 0.8" } }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - }, "node_modules/read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", @@ -13485,26 +13593,10 @@ "node": ">=0.10.0" } }, - "node_modules/regexp.prototype.flags": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", - "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true, "engines": { "node": ">=8" @@ -13684,15 +13776,6 @@ "node": ">=0.10.0" } }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/require-main-filename": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", @@ -13706,13 +13789,17 @@ "dev": true }, "node_modules/resolve": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", - "integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", "dev": true, "dependencies": { - "is-core-module": "^2.0.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -13819,9 +13906,9 @@ } }, "node_modules/run-parallel": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.10.tgz", - "integrity": "sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -13836,7 +13923,10 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } }, "node_modules/run-queue": { "version": "1.0.3", @@ -14041,65 +14131,6 @@ "node": ">=8" } }, - "node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/slice-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/slide": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", @@ -14515,71 +14546,6 @@ "node": "*" } }, - "node_modules/standard": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/standard/-/standard-16.0.4.tgz", - "integrity": "sha512-2AGI874RNClW4xUdM+bg1LRXVlYLzTNEkHmTG5mhyn45OhbgwA+6znowkOGYy+WMb5HRyELvtNy39kcdMQMcYQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "eslint": "~7.18.0", - "eslint-config-standard": "16.0.3", - "eslint-config-standard-jsx": "10.0.0", - "eslint-plugin-import": "~2.24.2", - "eslint-plugin-node": "~11.1.0", - "eslint-plugin-promise": "~5.1.0", - "eslint-plugin-react": "~7.25.1", - "standard-engine": "^14.0.1" - }, - "bin": { - "standard": "bin/cmd.js" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/standard-engine": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-14.0.1.tgz", - "integrity": "sha512-7FEzDwmHDOGva7r9ifOzD3BGdTbA7ujJ50afLVdW/tK14zQEptJjbFuUfn50irqdHDcTbNh0DTIoMPynMCXb0Q==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "get-stdin": "^8.0.0", - "minimist": "^1.2.5", - "pkg-conf": "^3.1.0", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": ">=8.10" - } - }, "node_modules/static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", @@ -14749,25 +14715,6 @@ "node": ">=0.10.0" } }, - "node_modules/string.prototype.matchall": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.6.tgz", - "integrity": "sha512-6WgDX8HmQqvEd7J+G6VtAahhsQIssiZ8zl7zKh1VDMFyL3hRTJP4FTNA3RbIp2TOQ9AYNDcc7e3fH0Qbup+DBg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1", - "get-intrinsic": "^1.1.1", - "has-symbols": "^1.0.2", - "internal-slot": "^1.0.3", - "regexp.prototype.flags": "^1.3.1", - "side-channel": "^1.0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/string.prototype.trimend": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", @@ -14848,6 +14795,18 @@ "node": ">=4" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/sver-compat": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", @@ -14867,89 +14826,6 @@ "node": ">=0.2.6" } }, - "node_modules/table": { - "version": "6.7.2", - "resolved": "https://registry.npmjs.org/table/-/table-6.7.2.tgz", - "integrity": "sha512-UFZK67uvyNivLeQbVtkiUs8Uuuxv24aSL4/Vil2PJVtMgU8Lx0CYkP12uCGa3kjyQzOSgV1+z9Wkb82fCGsO0g==", - "dev": true, - "dependencies": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table/node_modules/ajv": { - "version": "8.6.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.3.tgz", - "integrity": "sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/table/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/table/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/table/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/table/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/tapable": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", @@ -15379,18 +15255,6 @@ } } }, - "node_modules/ts-node/node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/ts-node/node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -15401,14 +15265,14 @@ } }, "node_modules/tsconfig-paths": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz", - "integrity": "sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", + "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", "dev": true, "dependencies": { "@types/json5": "^0.0.29", "json5": "^1.0.1", - "minimist": "^1.2.0", + "minimist": "^1.2.6", "strip-bom": "^3.0.0" } }, @@ -16680,15 +16544,6 @@ } } }, - "node_modules/xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -18035,40 +17890,71 @@ } }, "@eslint/eslintrc": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.3.0.tgz", - "integrity": "sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz", + "integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==", "dev": true, "requires": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", + "debug": "^4.3.2", + "espree": "^9.3.1", + "globals": "^13.9.0", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "lodash": "^4.17.20", + "js-yaml": "^4.1.0", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", + "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" } }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true } } }, + "@humanwhocodes/config-array": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", + "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -18153,28 +18039,28 @@ } }, "@nodelib/fs.scandir": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", - "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "requires": { - "@nodelib/fs.stat": "2.0.3", + "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, "@nodelib/fs.stat": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", - "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true }, "@nodelib/fs.walk": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz", - "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "requires": { - "@nodelib/fs.scandir": "2.1.3", + "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, @@ -18250,6 +18136,11 @@ "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, + "@types/mocha": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==" + }, "@types/node": { "version": "14.17.4", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.4.tgz", @@ -18262,6 +18153,199 @@ "integrity": "sha512-FwAQwMRbkhx0J6YELkwIpciVzCcgEqXEbIrIn3a2P5d3kGEHQ3wVhlN3YdVepYP+bZzCYO6OjmD4o9TGOZ40rA==", "dev": true }, + "@typescript-eslint/eslint-plugin": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.20.0.tgz", + "integrity": "sha512-fapGzoxilCn3sBtC6NtXZX6+P/Hef7VDbyfGqTTpzYydwhlkevB+0vE0EnmHPVTVSy68GUncyJ/2PcrFBeCo5Q==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "5.20.0", + "@typescript-eslint/type-utils": "5.20.0", + "@typescript-eslint/utils": "5.20.0", + "debug": "^4.3.2", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.1.8", + "regexpp": "^3.2.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "@typescript-eslint/parser": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.20.0.tgz", + "integrity": "sha512-UWKibrCZQCYvobmu3/N8TWbEeo/EPQbS41Ux1F9XqPzGuV7pfg6n50ZrFo6hryynD8qOTTfLHtHjjdQtxJ0h/w==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "5.20.0", + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/typescript-estree": "5.20.0", + "debug": "^4.3.2" + } + }, + "@typescript-eslint/scope-manager": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.20.0.tgz", + "integrity": "sha512-h9KtuPZ4D/JuX7rpp1iKg3zOH0WNEa+ZIXwpW/KWmEFDxlA/HSfCMhiyF1HS/drTICjIbpA6OqkAhrP/zkCStg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/visitor-keys": "5.20.0" + } + }, + "@typescript-eslint/type-utils": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.20.0.tgz", + "integrity": "sha512-WxNrCwYB3N/m8ceyoGCgbLmuZwupvzN0rE8NBuwnl7APgjv24ZJIjkNzoFBXPRCGzLNkoU/WfanW0exvp/+3Iw==", + "dev": true, + "requires": { + "@typescript-eslint/utils": "5.20.0", + "debug": "^4.3.2", + "tsutils": "^3.21.0" + }, + "dependencies": { + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/types": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.20.0.tgz", + "integrity": "sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.20.0.tgz", + "integrity": "sha512-36xLjP/+bXusLMrT9fMMYy1KJAGgHhlER2TqpUVDYUQg4w0q/NW/sg4UGAgVwAqb8V4zYg43KMUpM8vV2lve6w==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/visitor-keys": "5.20.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "@typescript-eslint/utils": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.20.0.tgz", + "integrity": "sha512-lHONGJL1LIO12Ujyx8L8xKbwWSkoUKFSO+0wDAqGXiudWB2EO7WEUT+YZLtVbmOmSllAjLb9tpoIPwpRe5Tn6w==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.20.0", + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/typescript-estree": "5.20.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "dependencies": { + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + } + }, + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.20.0.tgz", + "integrity": "sha512-1flRpNF+0CAQkMNlTJ6L/Z5jiODG/e5+7mk6XwtPOUS3UrTz3UOiAg9jG2VtKsWI6rZQfy4C6a232QNRZTRGlg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.20.0", + "eslint-visitor-keys": "^3.0.0" + } + }, "@ungap/promise-all-settled": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", @@ -18472,9 +18556,9 @@ } }, "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", "dev": true }, "acorn-jsx": { @@ -18895,26 +18979,15 @@ "dev": true }, "array.prototype.flat": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz", - "integrity": "sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", + "integrity": "sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==", "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" - } - }, - "array.prototype.flatmap": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.2.4.tgz", - "integrity": "sha512-r9Z0zYoxqHz60vvQbWEdXIEtCwHF0yxaWfno9qzXeNHvfyl3BZqygmGzb84dsubyaXLH4husF+NFgMSdpZhk2Q==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1", - "function-bind": "^1.1.1" + "es-abstract": "^1.19.2", + "es-shim-unscopables": "^1.0.0" } }, "asn1": { @@ -18970,12 +19043,6 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true - }, "async": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", @@ -21291,23 +21358,6 @@ } } }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1" - }, - "dependencies": { - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - } - } - }, "ent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", @@ -21333,9 +21383,9 @@ } }, "es-abstract": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", - "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.5.tgz", + "integrity": "sha512-Aa2G2+Rd3b6kxEUKTF4TaW67czBLyAv3z7VOhYRU50YBx+bbsYZ9xQP4lMNazePuFlybXI0V4MruPos7qUo5fA==", "dev": true, "requires": { "call-bind": "^1.0.2", @@ -21344,15 +21394,15 @@ "get-intrinsic": "^1.1.1", "get-symbol-description": "^1.0.0", "has": "^1.0.3", - "has-symbols": "^1.0.2", + "has-symbols": "^1.0.3", "internal-slot": "^1.0.3", "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", + "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", + "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-weakref": "^1.0.1", - "object-inspect": "^1.11.0", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", "string.prototype.trimend": "^1.0.4", @@ -21360,6 +21410,15 @@ "unbox-primitive": "^1.0.1" } }, + "es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, "es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", @@ -21497,54 +21556,52 @@ } }, "eslint": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.18.0.tgz", - "integrity": "sha512-fbgTiE8BfUJZuBeq2Yi7J3RB3WGUQ9PNuNbmgi6jt9Iv8qrkxfy19Ds3OpL1Pm7zg3BtTVhvcUZbIRQ0wmSjAQ==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.13.0.tgz", + "integrity": "sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.3.0", + "@eslint/eslintrc": "^1.2.1", + "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.2.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", + "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^6.0.0", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", + "glob-parent": "^6.0.1", + "globals": "^13.6.0", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.20", + "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^6.0.4", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { @@ -21556,6 +21613,12 @@ "color-convert": "^2.0.1" } }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "chalk": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", @@ -21581,19 +21644,67 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + }, "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, - "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "is-glob": "^4.0.3" + } + }, + "globals": { + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", + "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" } }, "has-flag": { @@ -21602,11 +21713,14 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } }, "levn": { "version": "0.4.1", @@ -21618,15 +21732,6 @@ "type-check": "~0.4.0" } }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -21647,22 +21752,13 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, - "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" } }, "supports-color": { @@ -21683,25 +21779,25 @@ "prelude-ls": "^1.2.1" } }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true } } }, - "eslint-config-standard": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz", - "integrity": "sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==", + "eslint-config-prettier": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", + "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", "dev": true, "requires": {} }, - "eslint-config-standard-jsx": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-10.0.0.tgz", - "integrity": "sha512-hLeA2f5e06W1xyr/93/QJulN/rLbUVUmqTlexv9PRKHFwEC9ffJcH2LvJhMoEqYQBEYafedgGZXH2W8NUpt5lA==", + "eslint-config-standard": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz", + "integrity": "sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==", "dev": true, "requires": {} }, @@ -21723,28 +21819,17 @@ "requires": { "ms": "^2.1.1" } - }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } } } }, "eslint-module-utils": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.1.tgz", - "integrity": "sha512-fjoetBXQZq2tSTWZ9yWVl2KuFrTZZH3V+9iD1V1RfpDgxzJR+mPd/KZmMiA8gbPqdBzpNiEHOuT7IYEWxrH0zQ==", + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz", + "integrity": "sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==", "dev": true, "requires": { "debug": "^3.2.7", - "find-up": "^2.1.0", - "pkg-dir": "^2.0.0" + "find-up": "^2.1.0" }, "dependencies": { "debug": { @@ -21798,49 +21883,28 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } } } }, - "eslint-plugin-es": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", - "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", - "dev": true, - "requires": { - "eslint-utils": "^2.0.0", - "regexpp": "^3.0.0" - } - }, "eslint-plugin-import": { - "version": "2.24.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.24.2.tgz", - "integrity": "sha512-hNVtyhiEtZmpsabL4neEj+6M5DCLgpYyG9nzJY8lZQeQXEn5UPW1DpUdsMHMXsq98dbNm7nt1w9ZMSVpfJdi8Q==", + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz", + "integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==", "dev": true, "requires": { - "array-includes": "^3.1.3", - "array.prototype.flat": "^1.2.4", + "array-includes": "^3.1.4", + "array.prototype.flat": "^1.2.5", "debug": "^2.6.9", "doctrine": "^2.1.0", "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.6.2", - "find-up": "^2.0.0", + "eslint-module-utils": "^2.7.3", "has": "^1.0.3", - "is-core-module": "^2.6.0", - "minimatch": "^3.0.4", - "object.values": "^1.1.4", - "pkg-up": "^2.0.0", - "read-pkg-up": "^3.0.0", - "resolve": "^1.20.0", - "tsconfig-paths": "^3.11.0" + "is-core-module": "^2.8.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.5", + "resolve": "^1.22.0", + "tsconfig-paths": "^3.14.1" }, "dependencies": { "debug": { @@ -21861,35 +21925,13 @@ "esutils": "^2.0.2" } }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { - "locate-path": "^2.0.0" - } - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "brace-expansion": "^1.1.7" } }, "ms": { @@ -21897,172 +21939,153 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-type": { + } + } + }, + "eslint-plugin-mocha": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.0.4.tgz", + "integrity": "sha512-8wzAeepVY027oBHz/TmBmUr7vhVqoC1KTFeDybFLhbaWKx+aQ7fJJVuUsqcUy+L+G+XvgQBJY+cbAf7hl5DF7Q==", + "dev": true, + "requires": { + "eslint-utils": "^3.0.0", + "ramda": "^0.28.0" + }, + "dependencies": { + "eslint-utils": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, "requires": { - "pify": "^3.0.0" + "eslint-visitor-keys": "^2.0.0" } }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - } - }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true } } }, - "eslint-plugin-node": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", - "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", + "eslint-plugin-n": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.1.0.tgz", + "integrity": "sha512-Tgx4Z58QXv2Ha7Qzp0u4wavnZNZ3AOievZMxrAxi7nvDbzD5B/JqOD80LHYcGHFZc2HD9jDmM/+KWMPov46a4A==", "dev": true, "requires": { - "eslint-plugin-es": "^3.0.0", - "eslint-utils": "^2.0.0", + "builtins": "^4.0.0", + "eslint-plugin-es": "^4.1.0", + "eslint-utils": "^3.0.0", "ignore": "^5.1.1", + "is-core-module": "^2.3.0", "minimatch": "^3.0.4", "resolve": "^1.10.1", - "semver": "^6.1.0" + "semver": "^6.3.0" }, "dependencies": { + "builtins": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-4.1.0.tgz", + "integrity": "sha512-1bPRZQtmKaO6h7qV1YHXNtr6nCK28k0Zo95KM4dXfILcZZwoHJBN1m3lfLv9LPkcOZlrSr+J1bzMaZFO98Yq0w==", + "dev": true, + "requires": { + "semver": "^7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "eslint-plugin-es": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", + "integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==", + "dev": true, + "requires": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "dependencies": { + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + } + }, + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true } } }, + "eslint-plugin-prettier": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz", + "integrity": "sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, "eslint-plugin-promise": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-5.1.1.tgz", - "integrity": "sha512-XgdcdyNzHfmlQyweOPTxmc7pIsS6dE4MvwhXWMQ2Dxs1XAL2GJDilUsjWen6TWik0aSI+zD/PqocZBblcm9rdA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz", + "integrity": "sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==", "dev": true, "requires": {} }, - "eslint-plugin-react": { - "version": "7.25.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.25.3.tgz", - "integrity": "sha512-ZMbFvZ1WAYSZKY662MBVEWR45VaBT6KSJCiupjrNlcdakB90juaZeDCbJq19e73JZQubqFtgETohwgAt8u5P6w==", - "dev": true, - "requires": { - "array-includes": "^3.1.3", - "array.prototype.flatmap": "^1.2.4", - "doctrine": "^2.1.0", - "estraverse": "^5.2.0", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.0.4", - "object.entries": "^1.1.4", - "object.fromentries": "^2.0.4", - "object.hasown": "^1.0.0", - "object.values": "^1.1.4", - "prop-types": "^15.7.2", - "resolve": "^2.0.0-next.3", - "string.prototype.matchall": "^4.0.5" - }, - "dependencies": { - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - }, - "resolve": { - "version": "2.0.0-next.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz", - "integrity": "sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q==", - "dev": true, - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - } - } - }, "eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -22081,46 +22104,21 @@ } } }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, "eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true }, "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", + "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", "dev": true, "requires": { - "acorn": "^7.4.0", + "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } + "eslint-visitor-keys": "^3.3.0" } }, "esprima": { @@ -22130,18 +22128,18 @@ "dev": true }, "esquery": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", - "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "requires": { "estraverse": "^5.1.0" }, "dependencies": { "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true } } @@ -22413,18 +22411,23 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, "fast-glob": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz", - "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==", + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.0", + "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.2", - "picomatch": "^2.2.1" + "micromatch": "^4.0.4" } }, "fast-json-stable-stringify": { @@ -22457,9 +22460,9 @@ } }, "fastq": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.9.0.tgz", - "integrity": "sha512-i7FVWL8HhVY+CTkwFxkN2mk3h+787ixS5S63eb78diVRc1MCssarHq3W5cj0av7YDSwmaV928RNag+U1etRQ7w==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -22952,12 +22955,6 @@ "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true }, - "get-stdin": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", - "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", - "dev": true - }, "get-symbol-description": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", @@ -23091,16 +23088,16 @@ "dev": true }, "globby": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", - "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "requires": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", "slash": "^3.0.0" } }, @@ -23266,9 +23263,9 @@ "dev": true }, "has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true }, "has-tostringtag": { @@ -23519,9 +23516,9 @@ "dev": true }, "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true }, "ignore-walk": { @@ -23707,9 +23704,9 @@ "dev": true }, "is-core-module": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", - "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", "dev": true, "requires": { "has": "^1.0.3" @@ -23797,9 +23794,9 @@ } }, "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -23822,9 +23819,9 @@ "dev": true }, "is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true }, "is-number": { @@ -23895,10 +23892,13 @@ "dev": true }, "is-shared-array-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", - "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", - "dev": true + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } }, "is-stream": { "version": "2.0.0", @@ -23965,12 +23965,12 @@ "dev": true }, "is-weakref": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.1.tgz", - "integrity": "sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, "requires": { - "call-bind": "^1.0.0" + "call-bind": "^1.0.2" } }, "is-windows": { @@ -24350,16 +24350,6 @@ "verror": "1.10.0" } }, - "jsx-ast-utils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.1.0.tgz", - "integrity": "sha512-d4/UOjg+mxAWxCiF0c5UTSwyqbchkbqCvK87aBovhnh8GtysTjWmgC63tY0cJx/HzGgm9qnA147jVBdpOiQ2RA==", - "dev": true, - "requires": { - "array-includes": "^3.1.1", - "object.assign": "^4.1.1" - } - }, "just-debounce": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.0.0.tgz", @@ -24819,12 +24809,6 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, "lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", @@ -24837,10 +24821,10 @@ "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", "dev": true }, - "lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, "log-symbols": { @@ -24865,15 +24849,6 @@ "streamroller": "^3.0.2" } }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -25107,13 +25082,13 @@ "dev": true }, "micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, "requires": { - "braces": "^3.0.1", - "picomatch": "^2.0.5" + "braces": "^3.0.2", + "picomatch": "^2.3.1" } }, "miller-rabin": { @@ -25177,9 +25152,9 @@ } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, "mississippi": { @@ -26286,9 +26261,9 @@ } }, "object-inspect": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", - "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", "dev": true }, "object-is": { @@ -26340,38 +26315,6 @@ "isobject": "^3.0.0" } }, - "object.entries": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz", - "integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - } - }, - "object.fromentries": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz", - "integrity": "sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - } - }, - "object.hasown": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.0.tgz", - "integrity": "sha512-MhjYRfj3GBlhSkDHo6QmvgjRLXQ2zndabdf3nX0yTyZK9rPfxb6uRpAac8HXNLy1GpqWtZ81Qh4v3uOls2sRAg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - } - }, "object.map": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", @@ -26672,9 +26615,9 @@ "dev": true }, "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, "path-root": { @@ -26733,9 +26676,9 @@ "dev": true }, "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, "pify": { @@ -26765,53 +26708,6 @@ "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", "dev": true }, - "pkg-conf": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", - "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", - "dev": true, - "requires": { - "find-up": "^3.0.0", - "load-json-file": "^5.2.0" - }, - "dependencies": { - "load-json-file": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", - "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.15", - "parse-json": "^4.0.0", - "pify": "^4.0.1", - "strip-bom": "^3.0.0", - "type-fest": "^0.3.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "type-fest": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", - "dev": true - } - } - }, "pkg-dir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", @@ -26821,60 +26717,6 @@ "find-up": "^3.0.0" } }, - "pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", - "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - } - } - }, "platform": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz", @@ -26905,6 +26747,21 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, + "prettier": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", + "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, "pretty-hrtime": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", @@ -26932,29 +26789,12 @@ "fromentries": "^1.2.0" } }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, "promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", "dev": true }, - "prop-types": { - "version": "15.7.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", - "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", - "dev": true, - "requires": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.8.1" - } - }, "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -27055,6 +26895,18 @@ "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", "dev": true }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "ramda": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.28.0.tgz", + "integrity": "sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA==", + "dev": true + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -27092,12 +26944,6 @@ "unpipe": "1.0.0" } }, - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - }, "read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", @@ -27338,20 +27184,10 @@ "safe-regex": "^1.1.0" } }, - "regexp.prototype.flags": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", - "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, "regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, "regexpu-core": { @@ -27490,12 +27326,6 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, "require-main-filename": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", @@ -27509,13 +27339,14 @@ "dev": true }, "resolve": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", - "integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", "dev": true, "requires": { - "is-core-module": "^2.0.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, "resolve-dir": { @@ -27593,10 +27424,13 @@ } }, "run-parallel": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.10.tgz", - "integrity": "sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw==", - "dev": true + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } }, "run-queue": { "version": "1.0.3", @@ -27766,49 +27600,6 @@ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - } - } - }, "slide": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", @@ -28151,34 +27942,6 @@ "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", "dev": true }, - "standard": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/standard/-/standard-16.0.4.tgz", - "integrity": "sha512-2AGI874RNClW4xUdM+bg1LRXVlYLzTNEkHmTG5mhyn45OhbgwA+6znowkOGYy+WMb5HRyELvtNy39kcdMQMcYQ==", - "dev": true, - "requires": { - "eslint": "~7.18.0", - "eslint-config-standard": "16.0.3", - "eslint-config-standard-jsx": "10.0.0", - "eslint-plugin-import": "~2.24.2", - "eslint-plugin-node": "~11.1.0", - "eslint-plugin-promise": "~5.1.0", - "eslint-plugin-react": "~7.25.1", - "standard-engine": "^14.0.1" - } - }, - "standard-engine": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-14.0.1.tgz", - "integrity": "sha512-7FEzDwmHDOGva7r9ifOzD3BGdTbA7ujJ50afLVdW/tK14zQEptJjbFuUfn50irqdHDcTbNh0DTIoMPynMCXb0Q==", - "dev": true, - "requires": { - "get-stdin": "^8.0.0", - "minimist": "^1.2.5", - "pkg-conf": "^3.1.0", - "xdg-basedir": "^4.0.0" - } - }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", @@ -28329,22 +28092,6 @@ "strip-ansi": "^3.0.0" } }, - "string.prototype.matchall": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.6.tgz", - "integrity": "sha512-6WgDX8HmQqvEd7J+G6VtAahhsQIssiZ8zl7zKh1VDMFyL3hRTJP4FTNA3RbIp2TOQ9AYNDcc7e3fH0Qbup+DBg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1", - "get-intrinsic": "^1.1.1", - "has-symbols": "^1.0.2", - "internal-slot": "^1.0.3", - "regexp.prototype.flags": "^1.3.1", - "side-channel": "^1.0.4" - } - }, "string.prototype.trimend": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", @@ -28404,6 +28151,12 @@ "has-flag": "^3.0.0" } }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, "sver-compat": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", @@ -28420,72 +28173,6 @@ "integrity": "sha1-KYexzivS84sNzio0OIiEv6RADqc=", "dev": true }, - "table": { - "version": "6.7.2", - "resolved": "https://registry.npmjs.org/table/-/table-6.7.2.tgz", - "integrity": "sha512-UFZK67uvyNivLeQbVtkiUs8Uuuxv24aSL4/Vil2PJVtMgU8Lx0CYkP12uCGa3kjyQzOSgV1+z9Wkb82fCGsO0g==", - "dev": true, - "requires": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "dependencies": { - "ajv": { - "version": "8.6.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.3.tgz", - "integrity": "sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - } - } - }, "tapable": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", @@ -28821,12 +28508,6 @@ "yn": "3.1.1" }, "dependencies": { - "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", - "dev": true - }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -28836,14 +28517,14 @@ } }, "tsconfig-paths": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz", - "integrity": "sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", + "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", "dev": true, "requires": { "@types/json5": "^0.0.29", "json5": "^1.0.1", - "minimist": "^1.2.0", + "minimist": "^1.2.6", "strip-bom": "^3.0.0" }, "dependencies": { @@ -29852,12 +29533,6 @@ "dev": true, "requires": {} }, - "xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "dev": true - }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index 1373387cf..30364cf6d 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ ], "dependencies": { "@babel/runtime": "^7.17.9", + "@types/mocha": "^9.1.1", "complex.js": "^2.1.1", "decimal.js": "^10.3.1", "escape-latex": "^1.2.0", @@ -42,6 +43,8 @@ "@babel/preset-env": "7.16.11", "@babel/register": "7.17.7", "@types/assert": "^1.5.6", + "@typescript-eslint/eslint-plugin": "^5.20.0", + "@typescript-eslint/parser": "^5.20.0", "assert": "2.0.0", "babel-loader": "8.2.4", "benchmark": "2.1.4", @@ -49,6 +52,14 @@ "core-js": "3.22.0", "del": "6.0.0", "dtslint": "4.2.1", + "eslint": "^8.13.0", + "eslint-config-prettier": "^8.5.0", + "eslint-config-standard": "^17.0.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-mocha": "^10.0.4", + "eslint-plugin-n": "^15.1.0", + "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-promise": "^6.0.0", "expect-type": "^0.13.0", "expr-eval": "2.0.2", "fancy-log": "2.0.0", @@ -75,8 +86,8 @@ "numericjs": "1.2.6", "nyc": "15.1.0", "pad-right": "0.2.2", + "prettier": "^2.6.2", "process": "0.11.10", - "standard": "16.0.4", "sylvester": "0.0.21", "ts-node": "10.7.0", "typescript": "4.6.3", @@ -135,7 +146,7 @@ "build:docs": "gulp --gulpfile gulpfile.cjs docs", "compile": "gulp --gulpfile gulpfile.cjs compile", "watch": "gulp --gulpfile gulpfile.cjs watch", - "lint": "standard --env=mocha --env=worker", + "lint": "eslint --cache --max-warnings 0 src/ test/ types/", "format": "npm run lint -- --fix", "validate:ascii": "gulp --gulpfile gulpfile.cjs validate:ascii", "test": "npm run test:src && npm run lint", diff --git a/src/core/function/import.js b/src/core/function/import.js index ad1d52b50..b4a6a02b0 100644 --- a/src/core/function/import.js +++ b/src/core/function/import.js @@ -82,8 +82,8 @@ export function importFactory (typed, load, math, importedFactories) { } else if (isFactory(value) || name !== undefined) { const flatName = isFactory(value) ? isTransformFunctionFactory(value) - ? (value.fn + '.transform') // TODO: this is ugly - : value.fn + ? (value.fn + '.transform') // TODO: this is ugly + : value.fn : name // we allow importing the same function twice if it points to the same implementation diff --git a/src/expression/node/BlockNode.js b/src/expression/node/BlockNode.js index 02cc4336a..a55691e18 100644 --- a/src/expression/node/BlockNode.js +++ b/src/expression/node/BlockNode.js @@ -32,10 +32,7 @@ export const createBlockNode = /* #__PURE__ */ factory(name, dependencies, ({ Re if (!isNode(node)) throw new TypeError('Property "node" must be a Node') if (typeof visible !== 'boolean') throw new TypeError('Property "visible" must be a boolean') - return { - node: node, - visible: visible - } + return { node, visible } }) } @@ -102,7 +99,7 @@ export const createBlockNode = /* #__PURE__ */ factory(name, dependencies, ({ Re const block = this.blocks[i] const node = this._ifNode(callback(block.node, 'blocks[' + i + '].node', this)) blocks[i] = { - node: node, + node, visible: block.visible } } diff --git a/src/expression/parse.js b/src/expression/parse.js index a0cddd119..229c39f54 100644 --- a/src/expression/parse.js +++ b/src/expression/parse.js @@ -177,7 +177,7 @@ export const createParse = /* #__PURE__ */ factory(name, dependencies, ({ true: true, false: false, null: null, - undefined: undefined + undefined } const NUMERIC_CONSTANTS = [ @@ -620,10 +620,7 @@ export const createParse = /* #__PURE__ */ factory(name, dependencies, ({ while (state.token === '\n' || state.token === ';') { // eslint-disable-line no-unmodified-loop-condition if (blocks.length === 0 && node) { visible = (state.token !== ';') - blocks.push({ - node: node, - visible: visible - }) + blocks.push({ node, visible }) } getToken(state) @@ -632,10 +629,7 @@ export const createParse = /* #__PURE__ */ factory(name, dependencies, ({ node.comment = state.comment visible = (state.token !== ';') - blocks.push({ - node: node, - visible: visible - }) + blocks.push({ node, visible }) } } diff --git a/src/function/algebra/decomposition/qr.js b/src/function/algebra/decomposition/qr.js index 03bf7b17a..24916bbde 100644 --- a/src/function/algebra/decomposition/qr.js +++ b/src/function/algebra/decomposition/qr.js @@ -233,8 +233,8 @@ export const createQr = /* #__PURE__ */ factory(name, dependencies, ( // return matrices return { - Q: Q, - R: R, + Q, + R, toString: function () { return 'Q: ' + this.Q.toString() + '\nR: ' + this.R.toString() } diff --git a/src/function/algebra/solver/utils/solveValidation.js b/src/function/algebra/solver/utils/solveValidation.js index 5970326f2..fdb43ca50 100644 --- a/src/function/algebra/solver/utils/solveValidation.js +++ b/src/function/algebra/solver/utils/solveValidation.js @@ -43,7 +43,7 @@ export function createSolveValidation ({ DenseMatrix }) { } return new DenseMatrix({ - data: data, + data, size: [rows, 1], datatype: b._datatype }) @@ -64,7 +64,7 @@ export function createSolveValidation ({ DenseMatrix }) { } return new DenseMatrix({ - data: data, + data, size: [rows, 1], datatype: b._datatype }) @@ -86,7 +86,7 @@ export function createSolveValidation ({ DenseMatrix }) { } return new DenseMatrix({ - data: data, + data, size: [rows, 1], datatype: b._datatype }) @@ -109,7 +109,7 @@ export function createSolveValidation ({ DenseMatrix }) { } return new DenseMatrix({ - data: data, + data, size: [rows, 1] }) } @@ -124,7 +124,7 @@ export function createSolveValidation ({ DenseMatrix }) { } return new DenseMatrix({ - data: data, + data, size: [rows, 1] }) } diff --git a/src/function/algebra/sparse/csChol.js b/src/function/algebra/sparse/csChol.js index 7f176c3d1..9c04d4956 100644 --- a/src/function/algebra/sparse/csChol.js +++ b/src/function/algebra/sparse/csChol.js @@ -153,9 +153,6 @@ export const createCsChol = /* #__PURE__ */ factory(name, dependencies, ( }) } // return L & P - return { - L: L, - P: P - } + return { L, P } } }) diff --git a/src/function/algebra/sparse/csLeaf.js b/src/function/algebra/sparse/csLeaf.js index 7d43326cb..95b1c651c 100644 --- a/src/function/algebra/sparse/csLeaf.js +++ b/src/function/algebra/sparse/csLeaf.js @@ -45,8 +45,5 @@ export function csLeaf (i, j, w, first, maxfirst, prevleaf, ancestor) { w[ancestor + s] = q } } - return { - jleaf: jleaf, - q: q - } + return { jleaf, q } } diff --git a/src/function/algebra/sparse/csLu.js b/src/function/algebra/sparse/csLu.js index dcf299399..9c9b40a56 100644 --- a/src/function/algebra/sparse/csLu.js +++ b/src/function/algebra/sparse/csLu.js @@ -160,10 +160,6 @@ export const createCsLu = /* #__PURE__ */ factory(name, dependencies, ({ abs, di uvalues.splice(unz, uvalues.length - unz) uindex.splice(unz, uindex.length - unz) // return LU factor - return { - L: L, - U: U, - pinv: pinv - } + return { L, U, pinv } } }) diff --git a/src/function/arithmetic/nthRoots.js b/src/function/arithmetic/nthRoots.js index 089d60222..92a5c8da1 100644 --- a/src/function/arithmetic/nthRoots.js +++ b/src/function/arithmetic/nthRoots.js @@ -54,7 +54,7 @@ export const createNthRoots = /* #__PURE__ */ factory(name, dependencies, ({ typ roots.push(_calculateExactResult[halfPiFactor % 4](r)) continue } - roots.push(new Complex({ r: r, phi: (arg + 2 * Math.PI * k) / root })) + roots.push(new Complex({ r, phi: (arg + 2 * Math.PI * k) / root })) } return roots } diff --git a/src/function/matrix/expm.js b/src/function/matrix/expm.js index df9e94be5..b721326a5 100644 --- a/src/function/matrix/expm.js +++ b/src/function/matrix/expm.js @@ -131,7 +131,7 @@ export const createExpm = /* #__PURE__ */ factory(name, dependencies, ({ typed, for (let q = 0; q <= k; q++) { const j = k - q if (errorEstimate(infNorm, q, j) < eps) { - return { q: q, j: j } + return { q, j } } } } diff --git a/src/function/probability/gamma.js b/src/function/probability/gamma.js index 4e7c8bdf2..614914fb6 100644 --- a/src/function/probability/gamma.js +++ b/src/function/probability/gamma.js @@ -106,7 +106,7 @@ export const createGamma = /* #__PURE__ */ factory(name, dependencies, ({ typed, } const precision = config.precision + (Math.log(n.toNumber()) | 0) - const Big = BigNumber.clone({ precision: precision }) + const Big = BigNumber.clone({ precision }) if (n % 2 === 1) { return n.times(bigFactorial(new BigNumber(n - 1))) diff --git a/src/function/string/bin.js b/src/function/string/bin.js index c876b2ce0..84ea1739d 100644 --- a/src/function/string/bin.js +++ b/src/function/string/bin.js @@ -30,7 +30,7 @@ export const createBin = factory(name, dependencies, ({ typed, format }) => { return format(n, { notation: 'bin' }) }, 'number | BigNumber, number': function (n, wordSize) { - return format(n, { notation: 'bin', wordSize: wordSize }) + return format(n, { notation: 'bin', wordSize }) } }) }) diff --git a/src/function/string/hex.js b/src/function/string/hex.js index cd47c744a..8e56eb796 100644 --- a/src/function/string/hex.js +++ b/src/function/string/hex.js @@ -30,7 +30,7 @@ export const createHex = factory(name, dependencies, ({ typed, format }) => { return format(n, { notation: 'hex' }) }, 'number | BigNumber, number': function (n, wordSize) { - return format(n, { notation: 'hex', wordSize: wordSize }) + return format(n, { notation: 'hex', wordSize }) } }) }) diff --git a/src/function/string/oct.js b/src/function/string/oct.js index 40fe24faa..e478ee2ab 100644 --- a/src/function/string/oct.js +++ b/src/function/string/oct.js @@ -31,7 +31,7 @@ export const createOct = factory(name, dependencies, ({ typed, format }) => { return format(n, { notation: 'oct' }) }, 'number | BigNumber, number': function (n, wordSize) { - return format(n, { notation: 'oct', wordSize: wordSize }) + return format(n, { notation: 'oct', wordSize }) } }) }) diff --git a/src/type/complex/Complex.js b/src/type/complex/Complex.js index 22f27c783..5953c216a 100644 --- a/src/type/complex/Complex.js +++ b/src/type/complex/Complex.js @@ -130,7 +130,7 @@ export const createComplexClass = /* #__PURE__ */ factory(name, dependencies, () } if (isNumber(phi)) { - return new Complex({ r: r, phi: phi }) + return new Complex({ r, phi }) } throw new TypeError('Phi is not a number nor an angle unit.') diff --git a/src/type/matrix/DenseMatrix.js b/src/type/matrix/DenseMatrix.js index 5fdae8f60..80fb03abe 100644 --- a/src/type/matrix/DenseMatrix.js +++ b/src/type/matrix/DenseMatrix.js @@ -730,7 +730,7 @@ export const createDenseMatrixClass = /* #__PURE__ */ factory(name, dependencies // create DenseMatrix return new DenseMatrix({ - data: data, + data, size: [n], datatype: this._datatype }) @@ -848,7 +848,7 @@ export const createDenseMatrixClass = /* #__PURE__ */ factory(name, dependencies // create DenseMatrix return new DenseMatrix({ - data: data, + data, size: [rows, columns] }) } diff --git a/src/type/matrix/FibonacciHeap.js b/src/type/matrix/FibonacciHeap.js index 663014b53..f9bd9bf86 100644 --- a/src/type/matrix/FibonacciHeap.js +++ b/src/type/matrix/FibonacciHeap.js @@ -34,8 +34,8 @@ export const createFibonacciHeapClass = /* #__PURE__ */ factory(name, dependenci FibonacciHeap.prototype.insert = function (key, value) { // create node const node = { - key: key, - value: value, + key, + value, degree: 0 } // check we have a node in the minimum diff --git a/src/type/matrix/SparseMatrix.js b/src/type/matrix/SparseMatrix.js index 7edde22aa..0a9ed203e 100644 --- a/src/type/matrix/SparseMatrix.js +++ b/src/type/matrix/SparseMatrix.js @@ -326,10 +326,10 @@ export const createSparseMatrixClass = /* #__PURE__ */ factory(name, dependencie // return matrix return new SparseMatrix({ - values: values, - index: index, - ptr: ptr, - size: size, + values, + index, + ptr, + size, datatype: matrix._datatype }) } @@ -931,9 +931,9 @@ export const createSparseMatrixClass = /* #__PURE__ */ factory(name, dependencie ptr.push(values.length) // return sparse matrix return new SparseMatrix({ - values: values, - index: index, - ptr: ptr, + values, + index, + ptr, size: [maxRow - minRow + 1, maxColumn - minColumn + 1] }) } @@ -1179,9 +1179,9 @@ export const createSparseMatrixClass = /* #__PURE__ */ factory(name, dependencie ptr.push(values.length) // return matrix return new SparseMatrix({ - values: values, - index: index, - ptr: ptr, + values, + index, + ptr, size: [n, 1] }) } @@ -1327,9 +1327,9 @@ export const createSparseMatrixClass = /* #__PURE__ */ factory(name, dependencie ptr.push(values.length) // create SparseMatrix return new SparseMatrix({ - values: values, - index: index, - ptr: ptr, + values, + index, + ptr, size: [rows, columns] }) } diff --git a/src/type/unit/Unit.js b/src/type/unit/Unit.js index 5eab5fd6a..06ff2a02d 100644 --- a/src/type/unit/Unit.js +++ b/src/type/unit/Unit.js @@ -368,7 +368,7 @@ export const createUnitClass = /* #__PURE__ */ factory(name, dependencies, ({ unit.units.push({ unit: res.unit, prefix: res.prefix, - power: power + power }) for (let i = 0; i < BASE_DIMENSIONS.length; i++) { unit.dimensions[i] += (res.unit.dimensions[i] || 0) * power @@ -538,10 +538,7 @@ export const createUnitClass = /* #__PURE__ */ factory(name, dependencies, ({ if (hasOwnProperty(UNITS, str)) { const unit = UNITS[str] const prefix = unit.prefixes[''] - return { - unit, - prefix - } + return { unit, prefix } } for (const name in UNITS) { @@ -555,10 +552,7 @@ export const createUnitClass = /* #__PURE__ */ factory(name, dependencies, ({ : undefined if (prefix !== undefined) { // store unit, prefix, and value - return { - unit, - prefix - } + return { unit, prefix } } } } @@ -3205,11 +3199,11 @@ export const createUnitClass = /* #__PURE__ */ factory(name, dependencies, ({ BASE_UNITS[baseName] = newBaseUnit newUnit = { - name: name, + name, value: 1, dimensions: BASE_UNITS[baseName].dimensions.slice(0), - prefixes: prefixes, - offset: offset, + prefixes, + offset, base: BASE_UNITS[baseName] } @@ -3219,11 +3213,11 @@ export const createUnitClass = /* #__PURE__ */ factory(name, dependencies, ({ } } else { newUnit = { - name: name, + name, value: defUnit.value, dimensions: defUnit.dimensions.slice(0), - prefixes: prefixes, - offset: offset + prefixes, + offset } // Create a new base if no matching base exists diff --git a/src/utils/lruQueue.js b/src/utils/lruQueue.js index 977c46962..89936c6e7 100644 --- a/src/utils/lruQueue.js +++ b/src/utils/lruQueue.js @@ -47,4 +47,4 @@ export function lruQueue (limit) { map = Object.create(null) } } -}; +} diff --git a/src/utils/number.js b/src/utils/number.js index e17c88f89..730f2cf7a 100644 --- a/src/utils/number.js +++ b/src/utils/number.js @@ -338,11 +338,7 @@ export function splitNumber (value) { exponent++ } - return { - sign: sign, - coefficients: coefficients, - exponent: exponent - } + return { sign, coefficients, exponent } } /** diff --git a/src/utils/object.js b/src/utils/object.js index 4216c864e..c9fb764b9 100644 --- a/src/utils/object.js +++ b/src/utils/object.js @@ -192,7 +192,7 @@ export function canDefineProperty () { // test needed for broken IE8 implementation try { if (Object.defineProperty) { - Object.defineProperty({}, 'x', { get: function () {} }) + Object.defineProperty({}, 'x', { get: function () { return null } }) return true } } catch (e) {} diff --git a/test/generated-code-tests/dependencies.test.js b/test/generated-code-tests/dependencies.test.js index e72469f74..51bf0107e 100644 --- a/test/generated-code-tests/dependencies.test.js +++ b/test/generated-code-tests/dependencies.test.js @@ -3,7 +3,7 @@ import { addDependencies, divideDependencies, piDependencies } from '../../src/e import { create } from '../../src/core/create.js' describe('dependencies', function () { - it('should create functions from a collection of dependencies', () => { + it('should create functions from a collection of dependencies', function () { const { add, divide, pi } = create({ addDependencies, divideDependencies, @@ -15,7 +15,7 @@ describe('dependencies', function () { assert.strictEqual(pi, Math.PI) }) - it('should create functions from with config', () => { + it('should create functions with config', function () { const config = { number: 'BigNumber' } const { pi } = create({ piDependencies diff --git a/test/generated-code-tests/entry/mainAny.test.js b/test/generated-code-tests/entry/mainAny.test.js index 4c7bcc921..e6f3a40de 100644 --- a/test/generated-code-tests/entry/mainAny.test.js +++ b/test/generated-code-tests/entry/mainAny.test.js @@ -10,7 +10,7 @@ const { } = createSnapshotFromFactories(factoriesAny) describe('mainAny', function () { - it('should export functions', () => { + it('should export functions', function () { assert.strictEqual(add(2, 3), 5) assert.strictEqual(sqrt(4), 2) }) @@ -72,22 +72,22 @@ describe('mainAny', function () { assert.throws(() => { evaluate('SymbolNode') }, /Undefined symbol SymbolNode/) }) - it('should export constants', () => { + it('should export constants', function () { assert.strictEqual(pi, Math.PI) }) - it('should export physical constants', () => { + it('should export physical constants', function () { assert.strictEqual(speedOfLight.toString(), '2.99792458e+8 m / s') }) - it('should export type checking functions', () => { + it('should export type checking functions', function () { assert.strictEqual(isObject({}), true) assert.strictEqual(isObject(null), false) assert.strictEqual(isMatrix([]), false) assert.strictEqual(isMatrix(matrix()), true) }) - it('should export evaluate having functions and constants', () => { + it('should export evaluate having functions and constants', function () { assert.strictEqual(evaluate('sqrt(4)'), 2) assert.strictEqual(evaluate('pi'), Math.PI) assert.strictEqual(evaluate('A[1]', { A: [1, 2, 3] }), 1) // one-based evaluation @@ -103,12 +103,12 @@ describe('mainAny', function () { assert.strictEqual(typeof evaluate('rationalize'), 'function') }) - it('should export chain with all functions', () => { + it('should export chain with all functions', function () { assert.strictEqual(chain(2).add(3).done(), 5) assert.strictEqual(chain('x + 2 * x').simplify().done().toString(), '3 * x') }) - it('should get/set scope variables', () => { + it('should get/set scope variables', function () { const math = create(all) const evaluate = math.evaluate @@ -119,7 +119,7 @@ describe('mainAny', function () { assert.deepStrictEqual(scope, { b: 2 }) }) - it('should evaluate assignement and access', () => { + it('should evaluate assignement and access', function () { const math = create(all) const evaluate = math.evaluate @@ -130,13 +130,13 @@ describe('mainAny', function () { assert.deepStrictEqual(scope, { A: [10, 200, 30] }) }) - it('should export evaluate having help and embedded docs', () => { + it('should export evaluate having help and embedded docs', function () { const h = evaluate('help(simplify)') assert(h.toString().indexOf('Name: simplify') >= 0, true) }) - it('should export reviver', () => { + it('should export reviver', function () { const json = '{"mathjs":"Complex","re":2,"im":4}' const c = new Complex(2, 4) diff --git a/test/generated-code-tests/entry/mainNumber.test.js b/test/generated-code-tests/entry/mainNumber.test.js index d450cf63c..fb9080375 100644 --- a/test/generated-code-tests/entry/mainNumber.test.js +++ b/test/generated-code-tests/entry/mainNumber.test.js @@ -10,7 +10,7 @@ const { } = createSnapshotFromFactories(factoriesNumber) describe('mainNumber', function () { - it('should export functions', () => { + it('should export functions', function () { assert.strictEqual(add(2, 3), 5) assert.strictEqual(sqrt(4), 2) }) @@ -82,17 +82,17 @@ describe('mainNumber', function () { assert.throws(() => { evaluate('SymbolNode') }, /Undefined symbol SymbolNode/) }) - it('should export constants', () => { + it('should export constants', function () { assert.strictEqual(pi, Math.PI) }) - it('should export type checking functions', () => { + it('should export type checking functions', function () { assert.strictEqual(isObject({}), true) assert.strictEqual(isObject(null), false) assert.strictEqual(isNumber('23'), false) }) - it('should export evaluate having functions and constants', () => { + it('should export evaluate having functions and constants', function () { assert.strictEqual(evaluate('sqrt(4)'), 2) assert.strictEqual(evaluate('pi'), Math.PI) @@ -107,25 +107,25 @@ describe('mainNumber', function () { assert.strictEqual(typeof evaluate('rationalize'), 'function') }) - it('should export chain with all functions', () => { + it('should export chain with all functions', function () { assert.strictEqual(chain(2).add(3).done(), 5) }) - it('derivative should work', () => { + it('derivative should work', function () { assert.strictEqual(derivative('2x', 'x').toString(), '2') }) - it('simplify should work', () => { + it('simplify should work', function () { assert.strictEqual(simplify('2x + 3x').toString(), '5 * x') }) - it('should export evaluate having help and embedded docs', () => { + it('should export evaluate having help and embedded docs', function () { const h = evaluate('help(simplify)') assert(h.toString().indexOf('Name: simplify') >= 0, true) }) - it('should get/set scope variables', () => { + it('should get/set scope variables', function () { const math = create(all) const evaluate = math.evaluate @@ -136,7 +136,7 @@ describe('mainNumber', function () { assert.deepStrictEqual(scope, { b: 2 }) }) - it('doe not support assignement and access right now', () => { + it('doe not support assignement and access right now', function () { // TODO: implement support for subset in number implementation assert.throws(function () { evaluate('A[2]', { A: [10, 20, 30] }) @@ -148,7 +148,7 @@ describe('mainNumber', function () { }, /No "index" implementation available/) }) - it('should export reviver', () => { + it('should export reviver', function () { const json = '{"mathjs":"Range","start":2,"end":10}' const r = new Range(2, 10) diff --git a/test/node-tests/doc.test.js b/test/node-tests/doc.test.js index 2b2c244e8..5d7815bdf 100644 --- a/test/node-tests/doc.test.js +++ b/test/node-tests/doc.test.js @@ -305,11 +305,11 @@ const bigwarning = `WARNING: ${knownProblems.size} known errors converted ` + `\n WARNING: ${knownUndocumented.size} symbols in math are known to ` + 'be undocumented; PLEASE EXTEND the documentation.' -describe(bigwarning + '\n Testing examples from (jsdoc) comments', () => { +describe(bigwarning + '\n Testing examples from (jsdoc) comments', function () { const allNames = Object.keys(math) const srcPath = path.resolve(__dirname, '../../src') + '/' const allDocs = docgenerator.collectDocs(allNames, srcPath) - it("should cover all names (but doesn't yet)", () => { + it("should cover all names (but doesn't yet)", function () { const documented = new Set(Object.keys(allDocs)) const badUndocumented = allNames.filter(name => { return !(documented.has(name) || @@ -330,9 +330,9 @@ describe(bigwarning + '\n Testing examples from (jsdoc) comments', () => { byCategory[fun.category].push(fun.doc) } for (const category in byCategory) { - describe('category: ' + category, () => { + describe('category: ' + category, function () { for (const doc of byCategory[category]) { - it('satisfies ' + doc.name, () => { + it('satisfies ' + doc.name, function () { console.log(` Testing ${doc.name} ...`) // can remove once no known failures; for now it clarifies "PLEASE RESOLVE" const lines = doc.examples lines.push('//') // modifies doc but OK for test diff --git a/test/node-tests/function/alegbra/decomposition/slu.test.js b/test/node-tests/function/alegbra/decomposition/slu.test.js index b27e9394f..4ef13caae 100644 --- a/test/node-tests/function/alegbra/decomposition/slu.test.js +++ b/test/node-tests/function/alegbra/decomposition/slu.test.js @@ -112,7 +112,7 @@ describe('slu - matrix market', function () { values: cvalues, index: cindex, ptr: cptr, - size: size, + size, datatype: A._datatype }) } diff --git a/test/node-tests/treeShaking/treeShaking.test.js b/test/node-tests/treeShaking/treeShaking.test.js index 81763c611..874935cd0 100644 --- a/test/node-tests/treeShaking/treeShaking.test.js +++ b/test/node-tests/treeShaking/treeShaking.test.js @@ -19,11 +19,11 @@ describe('tree shaking', function () { const bundleName = 'treeShakingApp.bundle.js' const bundleLicenseName = 'treeShakingApp.bundle.js.LICENSE.txt' - before(() => { + before(function () { cleanup() }) - after(() => { + after(function () { cleanup() }) diff --git a/test/unit-tests/core/config.test.js b/test/unit-tests/core/config.test.js index 68745d8b0..519ce7652 100644 --- a/test/unit-tests/core/config.test.js +++ b/test/unit-tests/core/config.test.js @@ -2,7 +2,7 @@ import assert from 'assert' import math from '../../../src/defaultInstance.js' describe('config', function () { - it('should allow setting config after having overwritten import', () => { + it('should allow setting config after having overwritten import', function () { const math2 = math.create() assert.strictEqual(math2.typeOf(math2.pi), 'number') diff --git a/test/unit-tests/core/import.test.js b/test/unit-tests/core/import.test.js index ca4ca051f..12fc8fcc8 100644 --- a/test/unit-tests/core/import.test.js +++ b/test/unit-tests/core/import.test.js @@ -238,7 +238,7 @@ describe('import', function () { return text.toUpperCase() } - math.import({ foo: foo }) + math.import({ foo }) assert(hasOwnProperty(math, 'foo')) assert.strictEqual(math.foo, foo) @@ -251,7 +251,7 @@ describe('import', function () { return 'test' } - math.import({ mean: mean }, { override: true }) + math.import({ mean }, { override: true }) assert(hasOwnProperty(math, 'mean')) assert.strictEqual(math.mean, mean) @@ -259,8 +259,8 @@ describe('import', function () { assert.strictEqual(math.expression.mathWithTransform.mean, mean) }) - describe('factory', () => { - it('should import a factory function', () => { + describe('factory', function () { + it('should import a factory function', function () { const math2 = create() assert.strictEqual(math2.multiplyTest, undefined) @@ -273,7 +273,7 @@ describe('import', function () { assert.strictEqual(math2.cubeTest(3), 27) }) - it('should import an array with factory functions', () => { + it('should import an array with factory functions', function () { const math2 = create() assert.strictEqual(math2.multiplyTest, undefined) @@ -285,7 +285,7 @@ describe('import', function () { assert.strictEqual(math2.cubeTest(3), 27) }) - it('should not allow nested nested paths in a factory', () => { + it('should not allow nested nested paths in a factory', function () { const math2 = create() assert.strictEqual(math2.tools, undefined) @@ -295,7 +295,7 @@ describe('import', function () { }, /Factory name should not contain a nested path/) }) - it('should import an array with factory functions in the correct order, resolving dependencies', () => { + it('should import an array with factory functions in the correct order, resolving dependencies', function () { const math2 = create() assert.strictEqual(math2.multiplyTest, undefined) @@ -308,7 +308,7 @@ describe('import', function () { assert.strictEqual(math2.cubeTest(3), 27) }) - it('should NOT import factory functions with custom name', () => { + it('should NOT import factory functions with custom name', function () { // changed since v6 const math2 = create() @@ -328,7 +328,7 @@ describe('import', function () { assert.strictEqual(math2.cubeTest(3), 27) }) - it('should throw an error when a dependency is missing with import factory', () => { + it('should throw an error when a dependency is missing with import factory', function () { const math2 = create() assert.throws(() => { @@ -338,22 +338,27 @@ describe('import', function () { }) }) + // eslint-disable-next-line mocha/no-skipped-tests it.skip('should import a factory with name', function () { // TODO: unit test importing a factory }) + // eslint-disable-next-line mocha/no-skipped-tests it.skip('should import a factory with path', function () { // TODO: unit test importing a factory }) + // eslint-disable-next-line mocha/no-skipped-tests it.skip('should import a factory without name', function () { // TODO: unit test importing a factory }) + // eslint-disable-next-line mocha/no-skipped-tests it.skip('should pass the namespace to a factory function', function () { // TODO: unit test importing a factory }) + // eslint-disable-next-line mocha/no-skipped-tests it.skip('should import an Array', function () { // TODO: unit test importing an Array containing stuff }) diff --git a/test/unit-tests/expression/function/parse.test.js b/test/unit-tests/expression/function/parse.test.js index d504f03cc..91d5c926d 100644 --- a/test/unit-tests/expression/function/parse.test.js +++ b/test/unit-tests/expression/function/parse.test.js @@ -26,14 +26,14 @@ describe('parse', function () { assert.strictEqual(nodes[1].compile().evaluate(), 9) }) - it('should parse expressions with internal newlines', () => { + it('should parse expressions with internal newlines', function () { assert.ok(math.parse('[1,\n2]') instanceof ArrayNode) assert.ok(math.parse('{x:1,\n y:2}') instanceof ObjectNode) assert.ok(math.parse('f(x,\n y)') instanceof FunctionNode) assert.ok(math.parse('3+\n7') instanceof OperatorNode) }) - it('should parse expressions with internal newlines and comments', () => { + it('should parse expressions with internal newlines and comments', function () { assert.ok(math.parse('[1, # One\n2]') instanceof ArrayNode) assert.ok(math.parse('{x:1, # x-coordinate\n y:2}') instanceof ObjectNode) assert.ok(math.parse('f(x, # first argument\n y)') instanceof FunctionNode) diff --git a/test/unit-tests/expression/node/FunctionAssignmentNode.test.js b/test/unit-tests/expression/node/FunctionAssignmentNode.test.js index 3745fed68..c08cf7ffd 100644 --- a/test/unit-tests/expression/node/FunctionAssignmentNode.test.js +++ b/test/unit-tests/expression/node/FunctionAssignmentNode.test.js @@ -140,7 +140,7 @@ describe('FunctionAssignmentNode', function () { return toObject(scope) } outputScope.rawArgs = true - math.import({ outputScope: outputScope }, { override: true }) + math.import({ outputScope }, { override: true }) // f(x) = outputScope(x) const x = new SymbolNode('x') @@ -149,7 +149,7 @@ describe('FunctionAssignmentNode', function () { const scope = { a: 2 } const f = n.evaluate(scope) - assert.deepStrictEqual(f(3), { a: 2, f: f, x: 3 }) + assert.deepStrictEqual(f(3), { a: 2, f, x: 3 }) }) it('should pass function arguments in scope to functions with rawArgs returned by another function', function () { @@ -163,8 +163,8 @@ describe('FunctionAssignmentNode', function () { } math.import({ - outputScope: outputScope, - returnOutputScope: returnOutputScope + outputScope, + returnOutputScope }, { override: true }) // f(x, y) = returnOutputScope(x)(y) @@ -185,7 +185,7 @@ describe('FunctionAssignmentNode', function () { return toObject(scope) } outputScope.transform.rawArgs = true - math.import({ outputScope: outputScope }, { override: true }) + math.import({ outputScope }, { override: true }) // f(x) = outputScope(x) const x = new SymbolNode('x') @@ -216,7 +216,7 @@ describe('FunctionAssignmentNode', function () { assert.deepStrictEqual(myFunc([1, 2, 3], 10), [10, 20, 30]) }) - it('should evaluate a function passed as a parameter', () => { + it('should evaluate a function passed as a parameter', function () { const applicator = math.evaluate('applicator(f,x) = f(x)') assert.strictEqual(applicator(math.exp, 1), math.e) const repeater = math.evaluate('repeater(f,x) = f(f(x))') @@ -433,7 +433,7 @@ describe('FunctionAssignmentNode', function () { { name: 'x', type: 'number' }, { name: 'y', type: 'any' } ], - expr: expr + expr }) const parsed = FunctionAssignmentNode.fromJSON(json) diff --git a/test/unit-tests/expression/node/FunctionNode.test.js b/test/unit-tests/expression/node/FunctionNode.test.js index 82965d783..e58a4d6f0 100644 --- a/test/unit-tests/expression/node/FunctionNode.test.js +++ b/test/unit-tests/expression/node/FunctionNode.test.js @@ -115,7 +115,7 @@ describe('FunctionNode', function () { return 'myFunction(' + args.join(', ') + ')' } myFunction.rawArgs = true - mymath.import({ myFunction: myFunction }) + mymath.import({ myFunction }) const s = new SymbolNode('myFunction') const a = new mymath.ConstantNode(4) @@ -162,7 +162,7 @@ describe('FunctionNode', function () { assert.ok(false, 'should not be executed') } myFunction.rawArgs = true - mymath.import({ myFunction: myFunction }) + mymath.import({ myFunction }) const s = new mymath.SymbolNode('myFunction') const a = new mymath.ConstantNode(4) @@ -620,7 +620,7 @@ describe('FunctionNode', function () { assert.throws(function () { tree.toTex() }, TypeError) }) - it('evaluates different sorts of function calls', () => { + it('evaluates different sorts of function calls', function () { const examples = [ ['1; square(3)', 9], ['f(x) = x*x; f(3)', 9], @@ -636,7 +636,7 @@ describe('FunctionNode', function () { } }) - it('produces clear error messages when the callee is not a function', () => { + it('produces clear error messages when the callee is not a function', function () { const throwers = [ ['tau(3)', TypeError, /tau.*value[\s\S]*6.28/], ['f = 7; f(3)', TypeError, /f.*value[\s\S]*7/], @@ -660,7 +660,7 @@ describe('FunctionNode', function () { }) // FIXME: custom instances should have there own function, not return the same function? - after(() => { + after(function () { const customMath = math.create() delete customMath.add.toTex delete customMath.sum.toTex diff --git a/test/unit-tests/expression/node/ObjectNode.test.js b/test/unit-tests/expression/node/ObjectNode.test.js index e89c77d29..be801db08 100644 --- a/test/unit-tests/expression/node/ObjectNode.test.js +++ b/test/unit-tests/expression/node/ObjectNode.test.js @@ -12,7 +12,7 @@ const ObjectNode = math.ObjectNode describe('ObjectNode', function () { it('should create an ObjectNode', function () { const c = new ConstantNode(1) - const a = new ObjectNode({ c: c }) + const a = new ObjectNode({ c }) const b = new ObjectNode() assert(a instanceof ObjectNode) assert(b instanceof ObjectNode) @@ -37,7 +37,7 @@ describe('ObjectNode', function () { it('should evaluate an ObjectNode', function () { const c = new ConstantNode(1) - const a = new ObjectNode({ c: c }) + const a = new ObjectNode({ c }) const b = new ObjectNode() assert.deepStrictEqual(a.compile().evaluate(), { c: 1 }) @@ -50,9 +50,9 @@ describe('ObjectNode', function () { const c = new ConstantNode(3) const d = new ConstantNode(4) - const n2 = new ObjectNode({ a: a, b: b }) - const n3 = new ObjectNode({ c: c, d: d }) - const n4 = new ObjectNode({ n2: n2, n3: n3 }) + const n2 = new ObjectNode({ a, b }) + const n3 = new ObjectNode({ c, d }) + const n4 = new ObjectNode({ n2, n3 }) const expr = n4.compile() assert.deepStrictEqual(expr.evaluate(), { n2: { a: 1, b: 2 }, n3: { c: 3, d: 4 } }) @@ -62,7 +62,7 @@ describe('ObjectNode', function () { const a = new ConstantNode(1) const b = new SymbolNode('x') const c = new ConstantNode(2) - const d = new ObjectNode({ a: a, b: b, c: c }) + const d = new ObjectNode({ a, b, c }) assert.deepStrictEqual(d.filter(function (node) { return node instanceof ObjectNode }), [d]) assert.deepStrictEqual(d.filter(function (node) { return node instanceof SymbolNode }), [b]) @@ -74,7 +74,7 @@ describe('ObjectNode', function () { it('should run forEach on an ObjectNode', function () { const a = new SymbolNode('x') const b = new ConstantNode(2) - const c = new ObjectNode({ a: a, b: b }) + const c = new ObjectNode({ a, b }) const nodes = [] const paths = [] @@ -93,7 +93,7 @@ describe('ObjectNode', function () { it('should map an ObjectNode', function () { const a = new SymbolNode('x') const b = new ConstantNode(2) - const c = new ObjectNode({ a: a, b: b }) + const c = new ObjectNode({ a, b }) const d = new ConstantNode(3) const nodes = [] @@ -119,7 +119,7 @@ describe('ObjectNode', function () { it('should throw an error when the map callback does not return a node', function () { const a = new SymbolNode('x') const b = new ConstantNode(2) - const c = new ObjectNode({ a: a, b: b }) + const c = new ObjectNode({ a, b }) assert.throws(function () { c.map(function () { return undefined }) @@ -129,7 +129,7 @@ describe('ObjectNode', function () { it('should transform an ObjectNodes parameters', function () { const a = new SymbolNode('x') const b = new ConstantNode(2) - const c = new ObjectNode({ a: a, b: b }) + const c = new ObjectNode({ a, b }) const d = new ConstantNode(3) const e = c.transform(function (node) { @@ -144,7 +144,7 @@ describe('ObjectNode', function () { it('should transform an ObjectNode itself', function () { const a = new SymbolNode('x') const b = new ConstantNode(2) - const c = new ObjectNode({ a: a, b: b }) + const c = new ObjectNode({ a, b }) const d = new ConstantNode(3) const e = c.transform(function (node) { @@ -159,8 +159,8 @@ describe('ObjectNode', function () { const a = new ConstantNode(1) const b = new ConstantNode(2) const c = new ConstantNode(3) - const d = new ObjectNode({ a: a, b: b }) - const e = new ObjectNode({ c: c, d: d }) + const d = new ObjectNode({ a, b }) + const e = new ObjectNode({ c, d }) let count = 0 e.traverse(function (node, path, parent) { @@ -205,7 +205,7 @@ describe('ObjectNode', function () { it('should clone an ObjectNode', function () { const a = new SymbolNode('x') const b = new ConstantNode(2) - const c = new ObjectNode({ a: a, b: b }) + const c = new ObjectNode({ a, b }) const d = c.clone() assert(d instanceof ObjectNode) @@ -236,8 +236,8 @@ describe('ObjectNode', function () { const a = new ConstantNode(1) const b = new ConstantNode(2) const c = new ConstantNode(3) - const n1 = new ObjectNode({ a: a, b: b }) - const n2 = new ObjectNode({ c: c, n1: n1 }) + const n1 = new ObjectNode({ a, b }) + const n2 = new ObjectNode({ c, n1 }) assert.strictEqual(n2.toString(), '{"c": 3, "n1": {"a": 1, "b": 2}}') }) @@ -251,7 +251,7 @@ describe('ObjectNode', function () { const a = new ConstantNode(1) const b = new ConstantNode(2) - const n = new ObjectNode({ a: a, b: b }) + const n = new ObjectNode({ a, b }) assert.strictEqual(n.toString({ handler: customFunction }), '{"a": const(1, number), "b": const(2, number)}') }) @@ -260,13 +260,13 @@ describe('ObjectNode', function () { const b = new ConstantNode(1) const c = new ConstantNode(2) - const node = new ObjectNode({ b: b, c: c }) + const node = new ObjectNode({ b, c }) const json = node.toJSON() assert.deepStrictEqual(json, { mathjs: 'ObjectNode', - properties: { b: b, c: c } + properties: { b, c } }) const parsed = ObjectNode.fromJSON(json) @@ -277,8 +277,8 @@ describe('ObjectNode', function () { const a = new ConstantNode(1) const b = new ConstantNode(2) const c = new ConstantNode(3) - const n1 = new ObjectNode({ a: a, b: b }) - const n2 = new ObjectNode({ c: c, n1: n1 }) + const n1 = new ObjectNode({ a, b }) + const n2 = new ObjectNode({ c, n1 }) assert.strictEqual(n2.toTex(), '\\left\\{\\begin{array}{ll}\\mathbf{c:} & 3\\\\\n\\mathbf{n1:} & \\left\\{\\begin{array}{ll}\\mathbf{a:} & 1\\\\\n\\mathbf{b:} & 2\\\\\\end{array}\\right\\}\\\\\\end{array}\\right\\}') }) @@ -292,7 +292,7 @@ describe('ObjectNode', function () { const a = new ConstantNode(1) const b = new ConstantNode(2) - const n = new ObjectNode({ a: a, b: b }) + const n = new ObjectNode({ a, b }) assert.strictEqual(n.toTex({ handler: customFunction }), '\\left\\{\\begin{array}{ll}\\mathbf{a:} & const\\left(1, number\\right)\\\\\n\\mathbf{b:} & const\\left(2, number\\right)\\\\\\end{array}\\right\\}') }) diff --git a/test/unit-tests/expression/security.test.js b/test/unit-tests/expression/security.test.js index 4c2f1e413..1d82ebeb9 100644 --- a/test/unit-tests/expression/security.test.js +++ b/test/unit-tests/expression/security.test.js @@ -391,7 +391,7 @@ describe('security', function () { assert.deepStrictEqual(math.evaluate('chain'), math.unit('chain')) }) - it('should not allow polluting the Object prototype via config', () => { + it('should not allow polluting the Object prototype via config', function () { const obj = {} assert.strictEqual(obj.polluted, undefined) @@ -401,7 +401,7 @@ describe('security', function () { assert.strictEqual(obj.polluted, undefined) }) - it('should not allow polluting the Object prototype via config via the expression parser', () => { + it('should not allow polluting the Object prototype via config via the expression parser', function () { const obj = {} assert.strictEqual(obj.polluted, undefined) @@ -410,7 +410,7 @@ describe('security', function () { assert.strictEqual(obj.polluted, undefined) }) - it('should not allow polluting the Object prototype by creating an object in the expression parser', () => { + it('should not allow polluting the Object prototype by creating an object in the expression parser', function () { const obj = {} assert.strictEqual(obj.polluted, undefined) diff --git a/test/unit-tests/function/algebra/decomposition/slu.test.js b/test/unit-tests/function/algebra/decomposition/slu.test.js index 496a1a505..eb7cccc4d 100644 --- a/test/unit-tests/function/algebra/decomposition/slu.test.js +++ b/test/unit-tests/function/algebra/decomposition/slu.test.js @@ -98,7 +98,7 @@ describe('slu', function () { values: cvalues, index: cindex, ptr: cptr, - size: size, + size, datatype: A._datatype }) } diff --git a/test/unit-tests/function/algebra/rationalize.test.js b/test/unit-tests/function/algebra/rationalize.test.js index ca29aedf4..6166b1668 100644 --- a/test/unit-tests/function/algebra/rationalize.test.js +++ b/test/unit-tests/function/algebra/rationalize.test.js @@ -122,6 +122,7 @@ describe('rationalize', function () { assert.strictEqual(stri(math.rationalize(no)), '(-20*x^4+28*x^3+104*x^2+6*x-12)/(6*x^2+5*x-4)') }) + // eslint-disable-next-line mocha/no-skipped-tests it.skip('processes a really complex expression', function () { // note this test passes but takes for ever to complete diff --git a/test/unit-tests/function/algebra/simplify.test.js b/test/unit-tests/function/algebra/simplify.test.js index 607c8ee6b..6c69d0dc6 100644 --- a/test/unit-tests/function/algebra/simplify.test.js +++ b/test/unit-tests/function/algebra/simplify.test.js @@ -4,6 +4,7 @@ import assert from 'assert' import math from '../../../../src/defaultInstance.js' const expLibrary = [] +// eslint-disable-next-line mocha/no-exports export function simplifyAndCompare (left, right, rules, scope, opt, stringOpt) { expLibrary.push(left) let simpLeft @@ -159,10 +160,10 @@ describe('simplify', function () { function doubleIt (x) { return x + x } const f = new math.FunctionNode(new math.SymbolNode('doubleIt'), [new math.SymbolNode('value')]) assert.strictEqual(f.toString(), 'doubleIt(value)') - assert.strictEqual(f.evaluate({ doubleIt: doubleIt, value: 4 }), 8) + assert.strictEqual(f.evaluate({ doubleIt, value: 4 }), 8) const fsimplified = math.simplifyCore(f) assert.strictEqual(fsimplified.toString(), 'doubleIt(value)') - assert.strictEqual(fsimplified.evaluate({ doubleIt: doubleIt, value: 4 }), 8) + assert.strictEqual(fsimplified.evaluate({ doubleIt, value: 4 }), 8) }) it('should handle immediately invoked function assignments', function () { @@ -404,6 +405,7 @@ describe('simplify', function () { assert.strictEqual(res.toString(), '30 * x') }) + // eslint-disable-next-line mocha/no-skipped-tests it.skip('should compute and simplify derivatives (3)', function () { // TODO: this requires the + operator to support Nodes, // i.e. math.add(5, math.parse('2')) => return an OperatorNode diff --git a/test/unit-tests/function/algebra/simplifyCore.test.js b/test/unit-tests/function/algebra/simplifyCore.test.js index 362b1c1a3..a4b80efcf 100644 --- a/test/unit-tests/function/algebra/simplifyCore.test.js +++ b/test/unit-tests/function/algebra/simplifyCore.test.js @@ -58,7 +58,7 @@ describe('simplifyCore', function () { assert.strictEqual(result, 'x + y - 1') }) - it('should recurse through arbitrary binary operators', () => { + it('should recurse through arbitrary binary operators', function () { testSimplifyCore('x+0==5', 'x == 5') testSimplifyCore('(x*1) % (y^1)', 'x % y') }) diff --git a/test/unit-tests/function/arithmetic/addScalar.test.js b/test/unit-tests/function/arithmetic/addScalar.test.js index ceb3fe44d..36a8bcb95 100644 --- a/test/unit-tests/function/arithmetic/addScalar.test.js +++ b/test/unit-tests/function/arithmetic/addScalar.test.js @@ -123,7 +123,7 @@ describe('addScalar', function () { approx.deepEqual(add(math.unit(math.complex(-3, 2), 'g'), math.unit(math.complex(5, -6), 'g')).toString(), '(2 - 4i) g') }) - it('should add units properly even when they have offsets', () => { + it('should add units properly even when they have offsets', function () { let t = math.unit(20, 'degC') assert.deepStrictEqual(add(t, math.unit(1, 'degC')), math.unit(21, 'degC')) t = math.unit(68, 'degF') diff --git a/test/unit-tests/function/arithmetic/invmod.test.js b/test/unit-tests/function/arithmetic/invmod.test.js index 5072d6743..2d9aaa024 100644 --- a/test/unit-tests/function/arithmetic/invmod.test.js +++ b/test/unit-tests/function/arithmetic/invmod.test.js @@ -5,34 +5,34 @@ import math from '../../../../src/defaultInstance.js' const { invmod, complex, bignumber } = math describe('invmod', function () { - it('should find the multiplicative inverse for basic cases', () => { + it('should find the multiplicative inverse for basic cases', function () { assert.strictEqual(invmod(2, 7), 4) assert.strictEqual(invmod(3, 11), 4) assert.strictEqual(invmod(10, 17), 12) }) - it('should return NaN when there is no multiplicative inverse', () => { + it('should return NaN when there is no multiplicative inverse', function () { assert(isNaN(invmod(3, 15))) assert(isNaN(invmod(14, 7))) assert(isNaN(invmod(42, 1200))) }) - it('should work when a≥b', () => { + it('should work when a≥b', function () { assert.strictEqual(invmod(4, 3), 1) assert(isNaN(invmod(7, 7))) }) - it('should work for negative values', () => { + it('should work for negative values', function () { assert.strictEqual(invmod(-2, 7), 3) assert.strictEqual(invmod(-2000000, 21), 10) }) - it('should calculate invmod for BigNumbers', () => { + it('should calculate invmod for BigNumbers', function () { assert.deepStrictEqual(invmod(bignumber(13), bignumber(25)), bignumber(2)) assert.deepStrictEqual(invmod(bignumber(-7), bignumber(48)), bignumber(41)) }) - it('should calculate invmod for mixed BigNumbers and Numbers', () => { + it('should calculate invmod for mixed BigNumbers and Numbers', function () { assert.deepStrictEqual(invmod(bignumber(44), 7), bignumber(4)) assert.deepStrictEqual(invmod(4, math.bignumber(15)), bignumber(4)) }) diff --git a/test/unit-tests/function/arithmetic/mod.test.js b/test/unit-tests/function/arithmetic/mod.test.js index 4d17f1386..08a13d4cf 100644 --- a/test/unit-tests/function/arithmetic/mod.test.js +++ b/test/unit-tests/function/arithmetic/mod.test.js @@ -57,6 +57,7 @@ describe('mod', function () { assert.deepStrictEqual(mod(bignumber(8), bignumber(3)).valueOf(), bignumber(2).valueOf()) }) + // eslint-disable-next-line mocha/no-skipped-tests it.skip('should calculate the modulus of bignumbers for fractions', function () { assert.deepStrictEqual(mod(bignumber(7).div(3), bignumber(1).div(3)), bignumber(0)) }) diff --git a/test/unit-tests/function/arithmetic/multiply.test.js b/test/unit-tests/function/arithmetic/multiply.test.js index 467aa8ba1..159dc4c6d 100644 --- a/test/unit-tests/function/arithmetic/multiply.test.js +++ b/test/unit-tests/function/arithmetic/multiply.test.js @@ -169,7 +169,7 @@ describe('multiply', function () { assert.strictEqual(multiply(unit(math.complex(3, -4), 'N'), unit(math.complex(7, -2), 'm')).toString(), '(13 - 34i) J') }) - it('should evaluate a complicated unit multiplication', () => { + it('should evaluate a complicated unit multiplication', function () { const v1 = math.evaluate('0.1 kg/s * 4.2 J/degC/g * 5 degC') approx.equal(v1.value, 2100) }) @@ -183,6 +183,7 @@ describe('multiply', function () { }) // TODO: cleanup once decided to not downgrade BigNumber to number + // eslint-disable-next-line mocha/no-skipped-tests it.skip('should multiply a bignumber and a unit correctly', function () { assert.strictEqual(multiply(bignumber(2), unit('5 mm')).toString(), '10 mm') assert.strictEqual(multiply(bignumber(2), unit('5 mm')).toString(), '10 mm') @@ -191,6 +192,7 @@ describe('multiply', function () { }) // TODO: cleanup once decided to not downgrade BigNumber to number + // eslint-disable-next-line mocha/no-skipped-tests it.skip('should multiply a bignumber and a unit without value correctly', function () { assert.strictEqual(multiply(bignumber(2), unit('mm')).toString(), '2 mm') assert.strictEqual(multiply(bignumber(2), unit('km')).toString(), '2 km') diff --git a/test/unit-tests/function/arithmetic/sign.test.js b/test/unit-tests/function/arithmetic/sign.test.js index b0cfba37e..bf0531b50 100644 --- a/test/unit-tests/function/arithmetic/sign.test.js +++ b/test/unit-tests/function/arithmetic/sign.test.js @@ -60,7 +60,7 @@ describe('sign', function () { assert.deepStrictEqual(math.sign(math.unit(complex(3, 4), 'mi')), complex(0.6, 0.8)) }) - it('should throw an error on a valueless unit or a unit with offset', () => { + it('should throw an error on a valueless unit or a unit with offset', function () { assert.throws(() => math.sign(math.unit('ohm')), TypeError) assert.throws(() => math.sign(math.unit('-3 degC')), /ambiguous/) }) diff --git a/test/unit-tests/function/arithmetic/subtract.test.js b/test/unit-tests/function/arithmetic/subtract.test.js index 5976ccc35..5e5036406 100644 --- a/test/unit-tests/function/arithmetic/subtract.test.js +++ b/test/unit-tests/function/arithmetic/subtract.test.js @@ -94,7 +94,7 @@ describe('subtract', function () { assert.deepStrictEqual(subtract(math.unit(math.complex(10, 10), 'K'), math.unit(3, 'K')), math.unit(math.complex(7, 10), 'K')) }) - it('should subtract units even when they have offsets', () => { + it('should subtract units even when they have offsets', function () { let t = math.unit(20, 'degC') assert.deepStrictEqual(subtract(t, math.unit(1, 'degC')), math.unit(19, 'degC')) t = math.unit(68, 'degF') diff --git a/test/unit-tests/function/arithmetic/unaryMinus.test.js b/test/unit-tests/function/arithmetic/unaryMinus.test.js index cce82c1b5..ebb6ccc29 100644 --- a/test/unit-tests/function/arithmetic/unaryMinus.test.js +++ b/test/unit-tests/function/arithmetic/unaryMinus.test.js @@ -13,6 +13,7 @@ describe('unaryMinus', function () { }) // TODO: unary minus should return bignumber on boolean input when configured for bignumber + // eslint-disable-next-line mocha/no-skipped-tests it.skip('should return bignumber unary minus of a boolean', function () { const bigmath = math.create({ number: 'BigNumber' }) assert.deepStrictEqual(bigmath.unaryMinus(true), bigmath.bignumber(-1)) diff --git a/test/unit-tests/function/matrix/eigs.test.js b/test/unit-tests/function/matrix/eigs.test.js index 84974b962..f907b1bd6 100644 --- a/test/unit-tests/function/matrix/eigs.test.js +++ b/test/unit-tests/function/matrix/eigs.test.js @@ -65,7 +65,7 @@ describe('eigs', function () { ) }) - it('calculates eigenvalues for 2x2 matrix with complex entries', () => { + it('calculates eigenvalues for 2x2 matrix with complex entries', function () { approx.deepEqual( eigs([[3, -2], [complex(4, 2), -1]]).values, [complex(0.08982028, 2.197368227), complex(1.91017972, -2.197368227)]) @@ -145,7 +145,7 @@ describe('eigs', function () { approx.deepEqual(Ei, E) }) - it('complex matrix eigenvector check', () => { + it('complex matrix eigenvector check', function () { // Example from issue #2478 const A = [[1, 2, 3], [2, 4, 0], [3, 0, 1]] const cnt = 0.1 diff --git a/test/unit-tests/function/matrix/pinv.test.js b/test/unit-tests/function/matrix/pinv.test.js index e9ad9aa31..305bd7363 100644 --- a/test/unit-tests/function/matrix/pinv.test.js +++ b/test/unit-tests/function/matrix/pinv.test.js @@ -32,7 +32,7 @@ function assertValidPinv (A, A_) { } describe('pinv', function () { - function test (A, A_, strict = false) { + function check (A, A_, strict = false) { const pinvA = pinv(A) if (A_) { if (strict) assert.deepStrictEqual(pinvA, A_) @@ -54,20 +54,20 @@ describe('pinv', function () { } } it('should return the inverse of a number', function () { - test(4, 1 / 4, true) - test(math.bignumber(4), math.bignumber(1 / 4), true) + check(4, 1 / 4, true) + check(math.bignumber(4), math.bignumber(1 / 4), true) }) it('should return the inverse of a matrix with just one value', function () { - test([4], [1 / 4], true) - test([[4]], [[1 / 4]], true) + check([4], [1 / 4], true) + check([[4]], [[1 / 4]], true) }) it('should return the inverse for each element in an array', function () { - test([4], [1 / 4], true) - test([[4]], [[1 / 4]], true) + check([4], [1 / 4], true) + check([[4]], [[1 / 4]], true) - test([ + check([ [1, 4, 7], [3, 0, 5], [-1, 9, 11] @@ -77,7 +77,7 @@ describe('pinv', function () { [-3.375, 1.625, 1.5] ]) - test([ + check([ [2, -1, 0], [-1, 2, -1], [0, -1, 2] @@ -87,7 +87,7 @@ describe('pinv', function () { [1 / 4, 1 / 2, 3 / 4] ]) - test([ + check([ [1, 0, 0], [0, 0, 1], [0, 1, 0] @@ -97,7 +97,7 @@ describe('pinv', function () { [0, 1, 0] ]) - test([ + check([ [1, 0, 0], [0, -1, 1], [0, 0, 1] @@ -109,14 +109,14 @@ describe('pinv', function () { }) it('should return the inverse for each element in a matrix', function () { - test(math.matrix([4]), math.matrix([1 / 4]), true) - test(math.matrix([[4]]), math.matrix([[1 / 4]]), true) - test(math.matrix([[4]], 'sparse'), math.matrix([[1 / 4]], 'sparse'), true) - test(math.matrix([[1, 2], [3, 4]], 'sparse'), math.matrix([[-2, 1], [1.5, -0.5]], 'sparse'), true) + check(math.matrix([4]), math.matrix([1 / 4]), true) + check(math.matrix([[4]]), math.matrix([[1 / 4]]), true) + check(math.matrix([[4]], 'sparse'), math.matrix([[1 / 4]], 'sparse'), true) + check(math.matrix([[1, 2], [3, 4]], 'sparse'), math.matrix([[-2, 1], [1.5, -0.5]], 'sparse'), true) }) it('should return the Moore–Penrose inverse of complex matrices', function () { - test( + check( math.evaluate(`[ [0.4032 + 0.0876i, 0.1678 + 0.0390i, 0.5425 + 0.5118i], [0.3174 + 0.3352i, 0.9784 + 0.4514i, -0.4416 - 1.3188i], @@ -131,14 +131,14 @@ describe('pinv', function () { }) it('should return the Moore–Penrose inverse of non-square matrices', function () { - test([[0, 0]], [[0], [0]], true) + check([[0, 0]], [[0], [0]], true) - test([1, 2, 3], [1 / 14, 2 / 14, 3 / 14]) + check([1, 2, 3], [1 / 14, 2 / 14, 3 / 14]) - test([[1, 2, 3], [4, 5, 6]], [[-17 / 18, 8 / 18], [-2 / 18, 2 / 18], [13 / 18, -4 / 18]]) - test([[1, 4], [2, 5], [3, 6]], [[-17 / 18, -2 / 18, 13 / 18], [8 / 18, 2 / 18, -4 / 18]]) + check([[1, 2, 3], [4, 5, 6]], [[-17 / 18, 8 / 18], [-2 / 18, 2 / 18], [13 / 18, -4 / 18]]) + check([[1, 4], [2, 5], [3, 6]], [[-17 / 18, -2 / 18, 13 / 18], [8 / 18, 2 / 18, -4 / 18]]) - test([ + check([ [64, 2, 3, 61, 60, 6], [9, 55, 54, 12, 13, 51], [17, 47, 46, 20, 21, 43], @@ -155,9 +155,9 @@ describe('pinv', function () { }) it('should return the Moore–Penrose inverse of non-invertable matrices', function () { - test([[0]], [[0]], true) - test([[1, 0], [0, 0]], [[1, 0], [0, 0]]) - test([[1, 1, 1], [1, 0, 0], [0, 0, 0]], [[0, 1, 0], [0.5, -0.5, 0], [0.5, -0.5, 0]]) + check([[0]], [[0]], true) + check([[1, 0], [0, 0]], [[1, 0], [0, 0]]) + check([[1, 1, 1], [1, 0, 0], [0, 0, 0]], [[0, 1, 0], [0.5, -0.5, 0], [0.5, -0.5, 0]]) }) it('should throw an error in case of wrong number of arguments', function () { diff --git a/test/unit-tests/function/matrix/range.test.js b/test/unit-tests/function/matrix/range.test.js index caa3584f6..21f807086 100644 --- a/test/unit-tests/function/matrix/range.test.js +++ b/test/unit-tests/function/matrix/range.test.js @@ -152,6 +152,7 @@ describe('range', function () { }) // FIXME: should give the right error + // eslint-disable-next-line mocha/no-skipped-tests it.skip('should not cast a single number or boolean to string', function () { assert.throws(function () { range(2) }, /TypeError: Too few arguments/) assert.throws(function () { range(true) }, /TypeError: Unexpected type of argument/) diff --git a/test/unit-tests/function/probability/lgamma.test.js b/test/unit-tests/function/probability/lgamma.test.js index f0185e9c6..f3c1cd7ea 100644 --- a/test/unit-tests/function/probability/lgamma.test.js +++ b/test/unit-tests/function/probability/lgamma.test.js @@ -18,8 +18,8 @@ const EPSILON = isInternetExplorer() ? 1e-6 : 1e-11 // lgamma for reals const CEPSILON = 5e-8 -describe('lgamma', () => { - it('should calculate the lgamma of 0 and negative numbers', () => { +describe('lgamma', function () { + it('should calculate the lgamma of 0 and negative numbers', function () { assert.strictEqual(lgamma(0), Infinity) assert.ok(isNaN(lgamma(-0.0005))) @@ -32,7 +32,7 @@ describe('lgamma', () => { assert.ok(isNaN(lgamma(-123456.123456))) }) - it('should calculate the lgamma of a positive numbers', () => { + it('should calculate the lgamma of a positive numbers', function () { // computation reference: https://www.wolframalpha.com/input?i=LogGamma%5Bx%5D approx.equal(lgamma(/**/ 0.000000001), /* */ 20.7232658363691954921, EPSILON) @@ -51,13 +51,13 @@ describe('lgamma', () => { approx.equal(lgamma(/* */ 1e92), /**/ 2.1083782855545220293e94, EPSILON) }) - it('should calculate the lgamma of an irrational number', () => { + it('should calculate the lgamma of an irrational number', function () { approx.equal(lgamma(Math.SQRT2), -0.12038230351896920333, EPSILON) approx.equal(lgamma(Math.PI), 0.82769459232343710153, EPSILON) approx.equal(lgamma(Math.E), 0.449461741820067667, EPSILON) }) - it('should calculate the lgamma of a complex number', () => { + it('should calculate the lgamma of a complex number', function () { approx.deepEqual(lgamma(math.complex(0, 0)), math.complex(Infinity), EPSILON) approx.deepEqual( lgamma(math.complex(0.000000001, 0.000000001)), @@ -200,7 +200,7 @@ describe('lgamma', () => { ) }) - it('should calculate the lgamma of some special arguments', () => { + it('should calculate the lgamma of some special arguments', function () { approx.equal(lgamma(true), 0, EPSILON) assert.strictEqual(lgamma(false), Infinity) @@ -211,21 +211,21 @@ describe('lgamma', () => { assert.ok(!isFinite(lgamma(-Infinity))) }) - it('should throw an error if called with a big number', () => { + it('should throw an error if called with a big number', function () { assert.throws(() => lgamma(math.bignumber(0))) }) - it('should throw an error if called with invalid number of arguments', () => { + it('should throw an error if called with invalid number of arguments', function () { assert.throws(() => lgamma()) assert.throws(() => lgamma(1, 3)) }) - it('should throw an error if called with invalid type of argument', () => { + it('should throw an error if called with invalid type of argument', function () { assert.throws(() => lgamma(new Date())) assert.throws(() => lgamma('a string')) }) - it('should LaTeX lgamma', () => { + it('should LaTeX lgamma', function () { const expression = math.parse('lgamma(2.5)') assert.strictEqual(expression.toTex(), '\\ln\\Gamma\\left(2.5\\right)') }) diff --git a/test/unit-tests/function/statistics/quantileSeq.test.js b/test/unit-tests/function/statistics/quantileSeq.test.js index 55bec0da2..a2ffccd75 100644 --- a/test/unit-tests/function/statistics/quantileSeq.test.js +++ b/test/unit-tests/function/statistics/quantileSeq.test.js @@ -59,6 +59,7 @@ describe('quantileSeq', function () { }) // FIXME: should return the quantileSeq of an array of bignumbers with number probability + // eslint-disable-next-line mocha/no-skipped-tests it.skip('should return the quantileSeq of an array of bignumbers with number probability', function () { approx.equal(quantileSeq([bignumber(0.5377), bignumber(1.8339), bignumber(-2.2588), bignumber(0.8622), bignumber(0.3188), bignumber(-1.3077), bignumber(-0.4336), bignumber(0.3426), diff --git a/test/unit-tests/function/statistics/variance.test.js b/test/unit-tests/function/statistics/variance.test.js index 9798e1150..53c6a6db3 100644 --- a/test/unit-tests/function/statistics/variance.test.js +++ b/test/unit-tests/function/statistics/variance.test.js @@ -117,7 +117,9 @@ describe('variance', function () { assert.throws(function () { variance('a') }, /Error: Cannot convert "a" to a number/) }) - it('should throw an error if the axis exceeds the dimension of the matrix') + it('should throw an error if the axis exceeds the dimension of the matrix', function () { + // TODO + }) it('should throw an error if called with an empty array', function () { assert.throws(function () { variance([]) }) diff --git a/test/unit-tests/function/string/format.test.js b/test/unit-tests/function/string/format.test.js index 45a037e86..d6c8773b9 100644 --- a/test/unit-tests/function/string/format.test.js +++ b/test/unit-tests/function/string/format.test.js @@ -357,7 +357,7 @@ describe('format', function () { }) }) - it('should format expressions', () => { + it('should format expressions', function () { assert.strictEqual(math.format(math.parse('0.3333'), { precision: 1 }), '0.3') assert.strictEqual(math.format(math.parse('0.3333 + [0.4444]'), { precision: 1 }), '0.3 + [0.4]') diff --git a/test/unit-tests/type/fraction/function/fraction.test.js b/test/unit-tests/type/fraction/function/fraction.test.js index d86bebfc3..8bad11163 100644 --- a/test/unit-tests/type/fraction/function/fraction.test.js +++ b/test/unit-tests/type/fraction/function/fraction.test.js @@ -11,13 +11,13 @@ describe('fraction', function () { equalFraction(math.fraction(null), new Fraction(0)) }) - it('should fail to create a fraction in case of non-integer quotient', () => { + it('should fail to create a fraction in case of non-integer quotient', function () { assert.throws(() => math.fraction(4, 5.1), /Parameters must be integer/) assert.throws(() => math.fraction(62.8, 10), /Parameters must be integer/) assert.throws(() => math.fraction(Infinity, 3), /Parameters must be integer/) }) - it('should create a fraction from a quotient regardless of integrality', () => { + it('should create a fraction from a quotient regardless of integrality', function () { equalFraction(math.divide(math.fraction(4), math.fraction(5.1)), math.fraction(40, 51)) }) diff --git a/test/unit-tests/type/matrix/SparseMatrix.test.js b/test/unit-tests/type/matrix/SparseMatrix.test.js index ddc02786a..cceb838dc 100644 --- a/test/unit-tests/type/matrix/SparseMatrix.test.js +++ b/test/unit-tests/type/matrix/SparseMatrix.test.js @@ -166,12 +166,14 @@ describe('SparseMatrix', function () { }) // TODO: add some more input validations to SparseMatrix + // eslint-disable-next-line mocha/no-skipped-tests it.skip('should throw an error when input array does not have two dimensions', function () { assert.throws(function () { console.log(new SparseMatrix([1, 2, 3])) }, /DimensionError: Two dimensional array expected/) assert.throws(function () { console.log(new SparseMatrix([[[1]], [[2]], [[3]]])) }, /DimensionError: Two dimensional array expected/) }) // TODO: add some more input validations to SparseMatrix + // eslint-disable-next-line mocha/no-skipped-tests it.skip('should throw an error when the dimensions of the input array are invalid', function () { assert.throws(function () { console.log(new SparseMatrix( @@ -1504,7 +1506,7 @@ describe('SparseMatrix', function () { }) }) - describe('index ordering', () => { + describe('index ordering', function () { const orderedSparseMatrix = new SparseMatrix({ values: [1, 3, 2, 4], index: [0, 1, 0, 1], @@ -1526,7 +1528,7 @@ describe('SparseMatrix', function () { { value: 4, index: [1, 1] } ] - it('should have parsed the two test matrices correctly', () => { + it('should have parsed the two test matrices correctly', function () { assert.deepStrictEqual(orderedSparseMatrix.toArray(), [[1, 2], [3, 4]]) assert.deepStrictEqual(unorderedSparseMatrix.toArray(), [[1, 2], [3, 4]]) }) diff --git a/test/unit-tests/type/unit/Unit.test.js b/test/unit-tests/type/unit/Unit.test.js index 6ea19431a..aa6776aaa 100644 --- a/test/unit-tests/type/unit/Unit.test.js +++ b/test/unit-tests/type/unit/Unit.test.js @@ -1008,7 +1008,7 @@ describe('Unit', function () { assert(math.isBigNumber(unitP.value)) }) - it('should multiply/divide units with offsets correctly', () => { + it('should multiply/divide units with offsets correctly', function () { const unit1 = new Unit(1, 'm') const unit2 = new Unit(1, 'degC') const unit3 = new Unit(1, 'm degC') @@ -1021,7 +1021,8 @@ describe('Unit', function () { assert.deepStrictEqual(unit4.divide(unit5), unit6) }) - it.skip('should cancel units in numerator and denominator', () => { + // eslint-disable-next-line mocha/no-skipped-tests + it.skip('should cancel units in numerator and denominator', function () { assert.strictEqual(math.evaluate('2 J/K/g * 2 g').toString(), '4 J / K') assert.strictEqual(math.evaluate('2 J/K/g * 2K').toString(), '4 J / g') }) diff --git a/test/unit-tests/type/unit/physicalConstants.test.js b/test/unit-tests/type/unit/physicalConstants.test.js index 1f3e089a0..eda53edcc 100644 --- a/test/unit-tests/type/unit/physicalConstants.test.js +++ b/test/unit-tests/type/unit/physicalConstants.test.js @@ -136,7 +136,7 @@ describe('physical constants', function () { assert.strictEqual(createPlanckTemperature(dependencies).toString(), '1.416785e+32 K') }) - it('should create BigNumber unit values if configured', () => { + it('should create BigNumber unit values if configured', function () { const config = { number: 'BigNumber', precision: 64, epsilon: 1e-12 } const dependencies = { config, BigNumber, Unit } const molarMass = createMolarMass(dependencies) diff --git a/test/unit-tests/utils/factory.test.js b/test/unit-tests/utils/factory.test.js index 20df2b7af..876c698d8 100644 --- a/test/unit-tests/utils/factory.test.js +++ b/test/unit-tests/utils/factory.test.js @@ -2,7 +2,7 @@ import assert from 'assert' import { sortFactories, factory, isFactory } from '../../../src/utils/factory.js' describe('factory', function () { - it('should test whether something is a factory', () => { + it('should test whether something is a factory', function () { assert.strictEqual(isFactory(), false) assert.strictEqual(isFactory({}), false) @@ -20,7 +20,7 @@ describe('factory', function () { assert.strictEqual(isFactory(factory3), true) }) - it('should only pass the dependencies, not the whole scope', (done) => { + it('should only pass the dependencies, not the whole scope', function (done) { const f = factory('fn1', ['a', 'c'], (scope) => { assert.deepStrictEqual(scope, { a: 1, c: 3 }) @@ -31,7 +31,8 @@ describe('factory', function () { }) // FIXME: this unit test doesn't work on IE either remove sortFactories if redundant, or use it and get the test working - it.skip('should order functions by their dependencies (1)', () => { + // eslint-disable-next-line mocha/no-skipped-tests + it.skip('should order functions by their dependencies (1)', function () { function fn1 () { return 1 } const fn2factory = factory('fn2', ['fn1'], () => {}) const fn3factory = factory('fn3', ['fn2'], () => {}) @@ -51,7 +52,7 @@ describe('factory', function () { .map(f => f.fn || f.name), ['fn1', 'fn2', 'fn3', 'fn5', 'fn4']) }) - it('should order functions by their dependencies (2)', () => { + it('should order functions by their dependencies (2)', function () { const fn1 = factory('fn1', [], () => {}) const fn2 = factory('fn2', ['fn4'], () => {}) const fn3 = factory('fn3', [], () => {}) @@ -62,7 +63,8 @@ describe('factory', function () { }) // TODO: throw an error in case of circular dependencies - it.skip('should not go crazy with circular dependencies', () => { + // eslint-disable-next-line mocha/no-skipped-tests + it.skip('should not go crazy with circular dependencies', function () { const fn1factory = factory('fn1', ['fn2'], () => {}) const fn2factory = factory('fn2', ['fn1'], () => {}) @@ -73,7 +75,7 @@ describe('factory', function () { .map(f => f.fn), ['fn2', 'fn1']) }) - it('should allow optional dependencies', () => { + it('should allow optional dependencies', function () { const createFn1 = factory('fn1', ['a', '?b'], ({ a, b }) => { return () => ({ a, b }) }) @@ -84,7 +86,7 @@ describe('factory', function () { assert.deepStrictEqual(a(), { a: 2, b: undefined }) }) - it('should attach meta information to a factory function', () => { + it('should attach meta information to a factory function', function () { const createFn1 = factory('fn1', [], () => {}) assert.strictEqual(createFn1.meta, undefined) diff --git a/test/unit-tests/utils/function.test.js b/test/unit-tests/utils/function.test.js index 3351c63ea..967152e39 100644 --- a/test/unit-tests/utils/function.test.js +++ b/test/unit-tests/utils/function.test.js @@ -75,7 +75,7 @@ describe('util.function', function () { }) describe('memoizeCompare', function () { - it('should memoize using comparison', () => { + it('should memoize using comparison', function () { let execCount = 0 function multiply (obj) { diff --git a/test/unit-tests/utils/map.test.js b/test/unit-tests/utils/map.test.js index 081885a06..66b956376 100644 --- a/test/unit-tests/utils/map.test.js +++ b/test/unit-tests/utils/map.test.js @@ -2,7 +2,7 @@ import assert from 'assert' import { isMap, ObjectWrappingMap, toObject, createMap, assign } from '../../../src/utils/map.js' describe('maps', function () { - it('should provide isMap, a function to tell maps from non-maps', () => { + it('should provide isMap, a function to tell maps from non-maps', function () { assert.ok(isMap(new Map())) assert.ok(!isMap([])) assert.ok(!isMap({})) @@ -29,7 +29,7 @@ describe('maps', function () { } }) - it('should wrap an object in a map-like object', () => { + it('should wrap an object in a map-like object', function () { const obj = { a: 1, b: 2, @@ -82,7 +82,7 @@ describe('maps', function () { assert.strictEqual(innerObject, obj) }) - it('should create a map from objects, maps, or undefined', () => { + it('should create a map from objects, maps, or undefined', function () { const emptyMap = createMap() assert.ok(isMap(emptyMap)) @@ -97,7 +97,7 @@ describe('maps', function () { } }) - it('should let us transform a map into an object', () => { + it('should let us transform a map into an object', function () { const actualMap = new Map() .set('a', 1) .set('b', 2) @@ -116,7 +116,7 @@ describe('maps', function () { assert.strictEqual(toObject(wrappedMap), obj) }) - it('should provide an assign function like Object.assign', () => { + it('should provide an assign function like Object.assign', function () { const target = new Map() .set('a', 1) .set('b', 2) diff --git a/test/unit-tests/utils/object.test.js b/test/unit-tests/utils/object.test.js index 014e877e9..7d43afb91 100644 --- a/test/unit-tests/utils/object.test.js +++ b/test/unit-tests/utils/object.test.js @@ -87,13 +87,13 @@ describe('object', function () { it('should extend an object with all properties of an other object', function () { const e = {} const o1 = { a: 2, b: 3 } - const o2 = { a: 4, b: null, c: undefined, d: 5, e: e } + const o2 = { a: 4, b: null, c: undefined, d: 5, e } const o3 = extend(o1, o2) assert.strictEqual(o1, o3) assert.strictEqual(o1.e, o3.e) - assert.deepStrictEqual(o3, { a: 4, b: null, c: undefined, d: 5, e: e }) - assert.deepStrictEqual(o2, { a: 4, b: null, c: undefined, d: 5, e: e }) // should be unchanged + assert.deepStrictEqual(o3, { a: 4, b: null, c: undefined, d: 5, e }) + assert.deepStrictEqual(o2, { a: 4, b: null, c: undefined, d: 5, e }) // should be unchanged }) it('should ignore inherited properties when extending an object', function () { @@ -112,7 +112,7 @@ describe('object', function () { it('should deep extend an object with all properties of an other object', function () { const e = { f: { g: 3 } } const o1 = { a: 2, b: 3 } - const o2 = { a: 4, b: null, c: undefined, d: 5, e: e } + const o2 = { a: 4, b: null, c: undefined, d: 5, e } const o3 = deepExtend(o1, o2) assert.strictEqual(o1, o3) @@ -287,8 +287,8 @@ describe('object', function () { describe('traverse', function () { it('should traverse an existing path into an object', function () { const a = {} - const b = { a: a } - const c = { b: b } + const b = { a } + const c = { b } assert.strictEqual(traverse(c), c) assert.strictEqual(traverse(c, ''), c) @@ -299,8 +299,8 @@ describe('object', function () { it('should append missing piece of a path', function () { const a = {} - const b = { a: a } - const c = { b: b } + const b = { a } + const c = { b } assert.strictEqual(traverse(c), c) assert.strictEqual(traverse(c, ''), c) @@ -326,7 +326,7 @@ describe('object', function () { }) describe('get', function () { - it('should get nested properties from an object', () => { + it('should get nested properties from an object', function () { const object = { a: 2, b: { @@ -346,7 +346,7 @@ describe('object', function () { }) describe('set', function () { - it('should set a nested property in an object', () => { + it('should set a nested property in an object', function () { assert.deepStrictEqual(set({}, [], 2), {}) assert.deepStrictEqual(set({}, 'a', 2), { a: 2 }) assert.deepStrictEqual(set({ a: 2 }, 'b.c', 3), { a: 2, b: { c: 3 } }) @@ -355,12 +355,12 @@ describe('object', function () { }) describe('pick', function () { - it('should pick the selected properties', () => { + it('should pick the selected properties', function () { const object = { a: 1, b: 2, c: 3 } assert.deepStrictEqual(pick(object, ['a', 'c', 'd']), { a: 1, c: 3 }) }) - it('should pick nested properties', () => { + it('should pick nested properties', function () { const object = { a: 1, b: { @@ -375,7 +375,7 @@ describe('object', function () { assert.deepStrictEqual(pick(object, ['a', 'b.c', 'foo', 'b.foo']), { a: 1, b: { c: 2 } }) }) - it('should pick and transform nested properties', () => { + it('should pick and transform nested properties', function () { const object = { a: 1, b: { @@ -398,7 +398,7 @@ describe('object', function () { }) describe('deepFlatten', function () { - it('should flatten nested object properties', () => { + it('should flatten nested object properties', function () { assert.deepStrictEqual(deepFlatten({ obj: { a: 2, b: 3 }, c: 4, @@ -406,7 +406,7 @@ describe('object', function () { }), { a: 2, b: 3, c: 4, d: 5 }) }) - it('should merge duplicate values when flatting nested object properties', () => { + it('should merge duplicate values when flatting nested object properties', function () { assert.deepStrictEqual(deepFlatten({ obj: { a: 2 }, foo: { bar: { a: 3 } } diff --git a/test/unit-tests/utils/string.test.js b/test/unit-tests/utils/string.test.js index f4a3255d1..0dbe95293 100644 --- a/test/unit-tests/utils/string.test.js +++ b/test/unit-tests/utils/string.test.js @@ -112,7 +112,7 @@ describe('string', function () { assert.strictEqual(format(true), 'true') }) - it('should limit the length of output with a truncate option', () => { + it('should limit the length of output with a truncate option', function () { const result = format('01234567890123456789', { truncate: 17 }) assert.strictEqual(result.length, 17) assert.ok(endsWith(result, '...')) diff --git a/types/index.d.ts b/types/index.d.ts index b23ec6bd0..15ebbad31 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,34 +1,37 @@ -import { Decimal } from 'decimal.js'; +import { Decimal } from 'decimal.js' -declare const math: math.MathJsStatic; -export as namespace math; -export = math; +declare const math: math.MathJsStatic +export as namespace math +export = math -type NoLiteralType = - T extends number ? number : - T extends string ? string : - T extends boolean ? boolean : - T; +type NoLiteralType = T extends number + ? number + : T extends string + ? string + : T extends boolean + ? boolean + : T declare namespace math { - type MathNumericType = number | BigNumber | Fraction | Complex; - type MathArray = MathNumericType[] | MathNumericType[][]; - type MathCollection = MathArray | Matrix; - type MathType = MathNumericType | Unit | MathCollection; - type MathExpression = string | string[] | MathCollection; + type MathNumericType = number | BigNumber | Fraction | Complex + type MathArray = MathNumericType[] | MathNumericType[][] + type MathCollection = MathArray | Matrix + type MathType = MathNumericType | Unit | MathCollection + type MathExpression = string | string[] | MathCollection - type FactoryFunction = (scope: any) => T; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + type FactoryFunction = (scope: any) => T // FactoryFunctionMap can be nested; all nested objects will be flattened interface FactoryFunctionMap { - [key: string]: FactoryFunction | FactoryFunctionMap; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [key: string]: FactoryFunction | FactoryFunctionMap } - /** Available options for parse */ interface ParseOptions { /** a set of custom nodes */ - nodes?: Record; + nodes?: Record } /** * Parse an expression. Returns a node tree, which can be evaluated by @@ -72,7 +75,7 @@ declare namespace math { * @param options Available options * @returns A node */ - (expr: MathExpression, options?: ParseOptions): MathNode; + (expr: MathExpression, options?: ParseOptions): MathNode /** * Parse an expression. Returns a node tree, which can be evaluated by @@ -82,7 +85,7 @@ declare namespace math { * @param options Available options * @returns An array of nodes */ - (exprs: MathExpression[], options?: ParseOptions): MathNode[]; + (exprs: MathExpression[], options?: ParseOptions): MathNode[] /** * Checks whether the current character `c` is a valid alpha character: @@ -101,13 +104,13 @@ declare namespace math { * @param cPrev Previous character * @param cNext Next character */ - isAlpha(c: string, cPrev: string, cNext: string): boolean; + isAlpha(c: string, cPrev: string, cNext: string): boolean /** * Test whether a character is a valid latin, greek, or letter-like character * * @param c */ - isValidLatinOrGreek(c: string): boolean; + isValidLatinOrGreek(c: string): boolean /** * Test whether two given 16 bit characters form a surrogate pair of a * unicode math symbol. @@ -122,14 +125,14 @@ declare namespace math { * @param high * @param low */ - isValidMathSymbol(high: string, low: string): boolean; + isValidMathSymbol(high: string, low: string): boolean /** * Check whether given character c is a white space character: space, tab, or enter * * @param c * @param nestingLevel */ - isWhitespace(c: string, nestingLevel: number): boolean; + isWhitespace(c: string, nestingLevel: number): boolean /** * Test whether the character c is a decimal mark (dot). * This is the case when it's not the start of a delimiter '.*', './', or '.^' @@ -137,224 +140,252 @@ declare namespace math { * @param c * @param cNext */ - isDecimalMark(c: string, cNext: string): boolean; + isDecimalMark(c: string, cNext: string): boolean /** * checks if the given char c is a digit or dot * * @param c a string with one character */ - isDigitDot(c: string): boolean; + isDigitDot(c: string): boolean /** * checks if the given char c is a digit * * @param c a string with one character */ - isDigit(c: string): boolean; + isDigit(c: string): boolean /** * checks if the given char c is a hex digit * * @param c a string with one character */ - isHexDigit(c: string): boolean; + isHexDigit(c: string): boolean } interface AccessorNode extends MathNodeCommon { - type: 'AccessorNode'; - isAccessorNode: true; - object: MathNode; - index: IndexNode; - name: string; + type: 'AccessorNode' + isAccessorNode: true + object: MathNode + index: IndexNode + name: string } interface AccessorNodeCtor { - new(object: MathNode, index: IndexNode): AccessorNode; + new (object: MathNode, index: IndexNode): AccessorNode } interface ArrayNode extends MathNodeCommon { - type: 'ArrayNode'; - isArrayNode: true; - items: MathNode[]; + type: 'ArrayNode' + isArrayNode: true + items: MathNode[] } interface ArrayNodeCtor { - new(items: MathNode[]): ArrayNode; + new (items: MathNode[]): ArrayNode } interface AssignmentNode extends MathNodeCommon { - type: 'AssignmentNode'; - isAssignmentNode: true; - object: SymbolNode | AccessorNode; - index: IndexNode | null; - value: MathNode; - name: string; + type: 'AssignmentNode' + isAssignmentNode: true + object: SymbolNode | AccessorNode + index: IndexNode | null + value: MathNode + name: string } interface AssignmentNodeCtor { - new(object: SymbolNode, value: MathNode): AssignmentNode; - new(object: SymbolNode | AccessorNode, index: IndexNode, value: MathNode): AssignmentNode; + new (object: SymbolNode, value: MathNode): AssignmentNode + new ( + object: SymbolNode | AccessorNode, + index: IndexNode, + value: MathNode + ): AssignmentNode } interface BlockNode extends MathNodeCommon { - type: 'BlockNode'; - isBlockNode: true; - blocks: Array<{node: MathNode, visible: boolean}>; + type: 'BlockNode' + isBlockNode: true + blocks: Array<{ node: MathNode; visible: boolean }> } interface BlockNodeCtor { - new(arr: Array<{node: MathNode} | {node: MathNode, visible: boolean}>): BlockNode; + new ( + arr: Array<{ node: MathNode } | { node: MathNode; visible: boolean }> + ): BlockNode } interface ConditionalNode extends MathNodeCommon { - type: 'ConditionalNode'; - isConditionalNode: boolean; - condition: MathNode; - trueExpr: MathNode; - falseExpr: MathNode; + type: 'ConditionalNode' + isConditionalNode: boolean + condition: MathNode + trueExpr: MathNode + falseExpr: MathNode } interface ConditionalNodeCtor { - new(condition: MathNode, trueExpr: MathNode, falseExpr: MathNode): ConditionalNode; + new ( + condition: MathNode, + trueExpr: MathNode, + falseExpr: MathNode + ): ConditionalNode } interface ConstantNode extends MathNodeCommon { - type: 'ConstantNode'; - isConstantNode: true; - value: any; + type: 'ConstantNode' + isConstantNode: true + // eslint-disable-next-line @typescript-eslint/no-explicit-any + value: any } interface ConstantNodeCtor { - new(constant: number): ConstantNode; + new (constant: number): ConstantNode } interface FunctionAssignmentNode extends MathNodeCommon { - type: 'FunctionAssignmentNode'; - isFunctionAssignmentNode: true; - name: string; - params: string[]; - expr: MathNode; + type: 'FunctionAssignmentNode' + isFunctionAssignmentNode: true + name: string + params: string[] + expr: MathNode } interface FunctionAssignmentNodeCtor { - new(name: string, params: string[], expr: MathNode): FunctionAssignmentNode; + new (name: string, params: string[], expr: MathNode): FunctionAssignmentNode } interface FunctionNode extends MathNodeCommon { - type: 'FunctionNode'; - isFunctionNode: true; - fn: SymbolNode; - args: MathNode[]; + type: 'FunctionNode' + isFunctionNode: true + fn: SymbolNode + args: MathNode[] } interface FunctionNodeCtor { - new(fn: MathNode | string, args: MathNode[]): FunctionNode; + new (fn: MathNode | string, args: MathNode[]): FunctionNode } interface IndexNode extends MathNodeCommon { - type: 'IndexNode'; - isIndexNode: true; - dimensions: MathNode[]; - dotNotation: boolean; + type: 'IndexNode' + isIndexNode: true + dimensions: MathNode[] + dotNotation: boolean } interface IndexNodeCtor { - new(dimensions: MathNode[]): IndexNode; - new(dimensions: MathNode[], dotNotation: boolean): IndexNode; + new (dimensions: MathNode[]): IndexNode + new (dimensions: MathNode[], dotNotation: boolean): IndexNode } interface ObjectNode extends MathNodeCommon { - type: 'ObjectNode'; - isObjectNode: true; - properties: Record; + type: 'ObjectNode' + isObjectNode: true + properties: Record } interface ObjectNodeCtor { - new(properties: Record): ObjectNode; + new (properties: Record): ObjectNode } interface OperatorNode extends MathNodeCommon { - type: 'OperatorNode'; - isOperatorNode: true; - op: string; - fn: string; - args: MathNode[]; - implicit: boolean; - isUnary(): boolean; - isBinary(): boolean; + type: 'OperatorNode' + isOperatorNode: true + op: string + fn: string + args: MathNode[] + implicit: boolean + isUnary(): boolean + isBinary(): boolean } interface OperatorNodeCtor { - new(op: string, fn: string, args: MathNode[], implicit?: boolean): OperatorNode; + new ( + op: string, + fn: string, + args: MathNode[], + implicit?: boolean + ): OperatorNode } interface ParenthesisNode extends MathNodeCommon { - type: 'ParenthesisNode'; - isParenthesisNode: true; - content: MathNode; + type: 'ParenthesisNode' + isParenthesisNode: true + content: MathNode } interface ParenthesisNodeCtor { - new(content: MathNode): ParenthesisNode; + new (content: MathNode): ParenthesisNode } interface RangeNode extends MathNodeCommon { - type: 'RangeNode'; - isRangeNode: true; - start: MathNode; - end: MathNode; - step: MathNode | null; + type: 'RangeNode' + isRangeNode: true + start: MathNode + end: MathNode + step: MathNode | null } interface RangeNodeCtor { - new(start: MathNode, end: MathNode, step?: MathNode): RangeNode; + new (start: MathNode, end: MathNode, step?: MathNode): RangeNode } interface RelationalNode extends MathNodeCommon { - type: 'RelationalNode'; - isRelationalNode: true; - conditionals: string[]; - params: MathNode[]; + type: 'RelationalNode' + isRelationalNode: true + conditionals: string[] + params: MathNode[] } interface RelationalNodeCtor { - new(conditionals: string[], params: MathNode[]): RelationalNode; + new (conditionals: string[], params: MathNode[]): RelationalNode } interface SymbolNode extends MathNodeCommon { - type: 'SymbolNode'; - isSymbolNode: true; - name: string; + type: 'SymbolNode' + isSymbolNode: true + name: string } interface SymbolNodeCtor { - new(name: string): SymbolNode; + new (name: string): SymbolNode } - type MathNode = AccessorNode | ArrayNode | AssignmentNode | BlockNode | ConditionalNode | ConstantNode | - FunctionAssignmentNode | FunctionNode | IndexNode | ObjectNode | OperatorNode | ParenthesisNode | RangeNode | - RelationalNode | SymbolNode; + type MathNode = + | AccessorNode + | ArrayNode + | AssignmentNode + | BlockNode + | ConditionalNode + | ConstantNode + | FunctionAssignmentNode + | FunctionNode + | IndexNode + | ObjectNode + | OperatorNode + | ParenthesisNode + | RangeNode + | RelationalNode + | SymbolNode - - type MathJsFunctionName = keyof MathJsStatic; + type MathJsFunctionName = keyof MathJsStatic interface MathJsStatic extends FactoryDependencies { - e: number; - pi: number; - i: number; - Infinity: number; - LN2: number; - LN10: number; - LOG2E: number; - LOG10E: number; - NaN: number; - phi: number; - SQRT1_2: number; - SQRT2: number; - tau: number; + e: number + pi: number + i: number + Infinity: number + LN2: number + LN10: number + LOG2E: number + LOG10E: number + NaN: number + phi: number + SQRT1_2: number + SQRT2: number + tau: number // Class-like constructors - AccessorNode: AccessorNodeCtor; - ArrayNode: ArrayNodeCtor; - AssignmentNode: AssignmentNodeCtor; - BlockNode: BlockNodeCtor; - ConditionalNode: ConditionalNodeCtor; - ConstantNode: ConstantNodeCtor; - FunctionAssignmentNode: FunctionAssignmentNodeCtor; - FunctionNode: FunctionNodeCtor; - IndexNode: IndexNodeCtor; - ObjectNode: ObjectNodeCtor; - OperatorNode: OperatorNodeCtor; - ParenthesisNode: ParenthesisNodeCtor; - RangeNode: RangeNodeCtor; - RelationalNode: RelationalNodeCtor; - SymbolNode: SymbolNodeCtor; + AccessorNode: AccessorNodeCtor + ArrayNode: ArrayNodeCtor + AssignmentNode: AssignmentNodeCtor + BlockNode: BlockNodeCtor + ConditionalNode: ConditionalNodeCtor + ConstantNode: ConstantNodeCtor + FunctionAssignmentNode: FunctionAssignmentNodeCtor + FunctionNode: FunctionNodeCtor + IndexNode: IndexNodeCtor + ObjectNode: ObjectNodeCtor + OperatorNode: OperatorNodeCtor + ParenthesisNode: ParenthesisNodeCtor + RangeNode: RangeNodeCtor + RelationalNode: RelationalNodeCtor + SymbolNode: SymbolNodeCtor - Matrix: MatrixCtor; + Matrix: MatrixCtor /** * If null were to be included in this interface, it would be @@ -365,15 +396,17 @@ declare namespace math { */ // null: number; - uninitialized: any; - version: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + uninitialized: any + version: string - expression: MathNode; + expression: MathNode /** * Returns reviver function that can be used as reviver in JSON.parse function. */ - reviver(): (key: any, value: any) => any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + reviver(): (key: any, value: any) => any /************************************************************************* * Core functions @@ -393,7 +426,7 @@ declare namespace math { * randomly seed. * @returns Returns the current configuration */ - config: (options: ConfigOptions) => ConfigOptions; + config: (options: ConfigOptions) => ConfigOptions /** * Create a typed-function which checks the types of the arguments and * can match them against multiple provided signatures. The @@ -404,7 +437,12 @@ declare namespace math { * @param signatures Object with one or multiple function signatures * @returns The created typed-function. */ - typed: (name: string, signatures: Record any>) => (...args: any[]) => any; + typed: ( + name: string, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + signatures: Record any> + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ) => (...args: any[]) => any /************************************************************************* * Construction functions @@ -417,8 +455,10 @@ declare namespace math { * @param x Value for the big number, 0 by default. * @returns The created bignumber */ - bignumber(x?: number | string | Fraction | BigNumber | boolean | Fraction | null): BigNumber; - bignumber(x: T): T; + bignumber( + x?: number | string | Fraction | BigNumber | boolean | Fraction | null + ): BigNumber + bignumber(x: T): T /** * Create a boolean or convert a string or number to a boolean. In case @@ -428,7 +468,9 @@ declare namespace math { * @param x A value of any type * @returns The boolean value */ - boolean(x: string | number | boolean | MathCollection | null): boolean | MathCollection; + boolean( + x: string | number | boolean | MathCollection | null + ): boolean | MathCollection /** * Wrap any value in a chain, allowing to perform chained operations on @@ -443,7 +485,8 @@ declare namespace math { * operation. * @returns The created chain */ - chain(value?: any): MathJsChain; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + chain(value?: any): MathJsChain /** * Create a complex value or convert a value to a complex value. @@ -451,15 +494,15 @@ declare namespace math { * complex number * @returns Returns a complex value */ - complex(arg?: Complex | string | PolarCoordinates): Complex; - complex(arg?: MathCollection): MathCollection; + complex(arg?: Complex | string | PolarCoordinates): Complex + complex(arg?: MathCollection): MathCollection /** * @param re Argument specifying the real part of the complex number * @param im Argument specifying the imaginary part of the complex * number * @returns Returns a complex value */ - complex(re: number, im: number): Complex; + complex(re: number, im: number): Complex /** * Create a user-defined unit and register it with the Unit type. @@ -475,14 +518,21 @@ declare namespace math { * 0. * @returns The new unit */ - createUnit(name: string, definition?: string | UnitDefinition, options?: CreateUnitOptions): Unit; + createUnit( + name: string, + definition?: string | UnitDefinition, + options?: CreateUnitOptions + ): Unit /** * Create a user-defined unit and register it with the Unit type. * @param units Definition of the unit * @param options * @returns The new unit */ - createUnit(units: Record, options?: CreateUnitOptions): Unit; + createUnit( + units: Record, + options?: CreateUnitOptions + ): Unit /** * Create a fraction convert a value to a fraction. @@ -490,16 +540,16 @@ declare namespace math { * fraction * @returns Returns a fraction */ - fraction(value: number | string | BigNumber | Fraction | object): Fraction; - fraction(values: MathArray): MathArray; - fraction(values: Matrix): Matrix; + fraction(value: number | string | BigNumber | Fraction | object): Fraction + fraction(values: MathArray): MathArray + fraction(values: Matrix): Matrix /** * @param numerator Argument specifying the numerator of the fraction * @param denominator Argument specifying the denominator of the * fraction * @returns Returns a fraction */ - fraction(numerator: number, denominator: number): Fraction; + fraction(numerator: number, denominator: number): Fraction /** * Create an index. An Index can store ranges having start, step, and @@ -508,7 +558,8 @@ declare namespace math { * @param ranges Zero or more ranges or numbers. * @returns Returns the created index */ - index(...ranges: any[]): Index; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + index(...ranges: any[]): Index /** * Create a Matrix. The function creates a new math.type.Matrix object @@ -518,14 +569,18 @@ declare namespace math { * @param format The Matrix storage format * @returns The created Matrix */ - matrix(format?: 'sparse' | 'dense'): Matrix; + matrix(format?: 'sparse' | 'dense'): Matrix /** * @param data A multi dimensional array * @param format The Matrix storage format * @param dataType The Matrix data type * @returns The created Matrix */ - matrix(data: MathCollection, format?: 'sparse' | 'dense', dataType?: string): Matrix; + matrix( + data: MathCollection, + format?: 'sparse' | 'dense', + dataType?: string + ): Matrix /** * Create a number or convert a string, boolean, or unit to a number. @@ -533,14 +588,24 @@ declare namespace math { * @param value Value to be converted * @returns The created number */ - number(value?: string | number | BigNumber | Fraction | boolean | MathCollection | Unit | null): number | MathCollection; + number( + value?: + | string + | number + | BigNumber + | Fraction + | boolean + | MathCollection + | Unit + | null + ): number | MathCollection /** * @param value Value to be converted * @param valuelessUnit A valueless unit, used to convert a unit to a * number * @returns The created number */ - number(unit: Unit, valuelessUnit: Unit | string): number; + number(unit: Unit, valuelessUnit: Unit | string): number /** * Create a Sparse Matrix. The function creates a new math.type.Matrix @@ -551,7 +616,7 @@ declare namespace math { * @param dataType Sparse Matrix data type * @returns The created matrix */ - sparse(data?: MathCollection, dataType?: string): Matrix; + sparse(data?: MathCollection, dataType?: string): Matrix /** * Split a unit in an array of units whose sum is equal to the original @@ -560,7 +625,7 @@ declare namespace math { * @param parts An array of strings or valueless units * @returns An array of units */ - splitUnit(unit: Unit, parts: Unit[]): Unit[]; + splitUnit(unit: Unit, parts: Unit[]): Unit[] /** * Create a string or convert any object into a string. Elements of @@ -568,7 +633,7 @@ declare namespace math { * @param value A value to convert to a string * @returns The created string */ - string(value: MathType | null): string | MathCollection; + string(value: MathType | null): string | MathCollection /** * Create a unit. Depending on the passed arguments, the function will @@ -577,18 +642,18 @@ declare namespace math { * @param unit The unit to be created * @returns The created unit */ - unit(unit: string): Unit; + unit(unit: string): Unit /** * @param unit The unit to be created * @returns The created unit */ - unit(unit: Unit): Unit; + unit(unit: Unit): Unit /** * @param value The value of the unit to be created * @param unit The unit to be created * @returns The created unit */ - unit(value: number | MathCollection | BigNumber, unit: string): Unit; + unit(value: number | MathCollection | BigNumber, unit: string): Unit /************************************************************************* * Expression functions @@ -600,12 +665,12 @@ declare namespace math { * @param expr The expression to be compiled * @returns An object with the compiled expression */ - compile(expr: MathExpression): EvalFunction; + compile(expr: MathExpression): EvalFunction /** * @param exprs The expressions to be compiled * @returns An array of objects with the compiled expressions */ - compile(exprs: MathExpression[]): EvalFunction[]; + compile(exprs: MathExpression[]): EvalFunction[] /** * Evaluate an expression. @@ -613,7 +678,11 @@ declare namespace math { * @param scope Scope to read/write variables * @returns The result of the expression */ - evaluate(expr: MathExpression | MathExpression[] | Matrix, scope?: object): any; + evaluate( + expr: MathExpression | MathExpression[] | Matrix, + scope?: object + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ): any /** * Retrieve help on a function or data type. Help files are retrieved @@ -621,20 +690,21 @@ declare namespace math { * @param search A function or function name for which to get help * @returns A help object */ - help(search: () => any): Help; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + help(search: () => any): Help /** * Parse an expression. Returns a node tree, which can be evaluated by * invoking node.evaluate(); */ - parse: ParseFunction; + parse: ParseFunction /** * Create a parser. The function creates a new math.expression.Parser * object. * @returns A Parser object */ - parser(): Parser; + parser(): Parser /************************************************************************* * Algebra functions @@ -646,7 +716,11 @@ declare namespace math { * by default. When false, output will not be simplified. * @returns The derivative of expr */ - derivative(expr: MathNode | string, variable: MathNode | string, options?: { simplify: boolean }): MathNode; + derivative( + expr: MathNode | string, + variable: MathNode | string, + options?: { simplify: boolean } + ): MathNode /** * Solves the linear equation system by forwards substitution. Matrix @@ -655,7 +729,7 @@ declare namespace math { * @param b A column vector with the b values * @returns A column vector with the linear system solution (x) */ - lsolve(L: Matrix | MathArray, b: Matrix | MathArray): Matrix | MathArray; + lsolve(L: Matrix | MathArray, b: Matrix | MathArray): Matrix | MathArray /** * Calculate the Matrix LU decomposition with partial pivoting. Matrix A @@ -666,7 +740,11 @@ declare namespace math { * @returns The lower triangular matrix, the upper triangular matrix and * the permutation matrix. */ - lup(A?: Matrix | MathArray): { L: MathCollection; U: MathCollection; P: number[] }; + lup(A?: Matrix | MathArray): { + L: MathCollection + U: MathCollection + P: number[] + } /** * Solves the linear system A * x = b where A is an [n x n] matrix and b @@ -680,7 +758,12 @@ declare namespace math { * @returns Column vector with the solution to the linear system A * x = * b */ - lusolve(A: Matrix | MathArray | number, b: Matrix | MathArray, order?: number, threshold?: number): Matrix | MathArray; + lusolve( + A: Matrix | MathArray | number, + b: Matrix | MathArray, + order?: number, + threshold?: number + ): Matrix | MathArray /** * Calculate the Matrix QR decomposition. Matrix A is decomposed in two @@ -690,9 +773,13 @@ declare namespace math { * decomposition. * @returns Q: the orthogonal matrix and R: the upper triangular matrix */ - qr(A: Matrix | MathArray): { Q: MathCollection; R: MathCollection }; + qr(A: Matrix | MathArray): { Q: MathCollection; R: MathCollection } - rationalize(expr: MathNode | string, optional?: object | boolean, detailed?: false): MathNode; + rationalize( + expr: MathNode | string, + optional?: object | boolean, + detailed?: false + ): MathNode /** * Transform a rationalizable expression in a rational fraction. If * rational fraction is one variable polynomial then converts the @@ -706,11 +793,14 @@ declare namespace math { * @returns The rational polynomial of expr */ rationalize( - expr: MathNode | string, - optional?: object | boolean, - detailed?: true - ): { expression: MathNode | string; variables: string[]; coefficients: MathType[] }; - + expr: MathNode | string, + optional?: object | boolean, + detailed?: true + ): { + expression: MathNode | string + variables: string[] + coefficients: MathType[] + } /** * Simplify an expression tree. @@ -723,7 +813,7 @@ declare namespace math { * @param [options] (optional) An object with simplify options * @returns Returns the simplified form of expr */ - simplify: Simplify; + simplify: Simplify /** * Calculate the Sparse Matrix LU decomposition with full pivoting. @@ -744,7 +834,7 @@ declare namespace math { * @returns The lower triangular matrix, the upper triangular matrix and * the permutation vectors. */ - slu(A: Matrix, order: number, threshold: number): object; + slu(A: Matrix, order: number, threshold: number): object /** * Solves the linear equation system by backward substitution. Matrix @@ -753,7 +843,7 @@ declare namespace math { * @param b A column vector with the b values * @returns A column vector with the linear system solution (x) */ - usolve(U: Matrix | MathArray, b: Matrix | MathArray): Matrix | MathArray; + usolve(U: Matrix | MathArray, b: Matrix | MathArray): Matrix | MathArray /************************************************************************* * Arithmetic functions @@ -765,13 +855,13 @@ declare namespace math { * @param x A number or matrix for which to get the absolute value * @returns Absolute value of x */ - abs(x: number): number; - abs(x: BigNumber): BigNumber; - abs(x: Fraction): Fraction; - abs(x: Complex): Complex; - abs(x: MathArray): MathArray; - abs(x: Matrix): Matrix; - abs(x: Unit): Unit; + abs(x: number): number + abs(x: BigNumber): BigNumber + abs(x: Fraction): Fraction + abs(x: Complex): Complex + abs(x: MathArray): MathArray + abs(x: Matrix): Matrix + abs(x: Unit): Unit /** * Add two values, x + y. For matrices, the function is evaluated @@ -780,8 +870,8 @@ declare namespace math { * @param y Second value to add * @returns Sum of x and y */ - add(x: T, y: T): T; - add(x: MathType, y: MathType): MathType; + add(x: T, y: T): T + add(x: MathType, y: MathType): MathType /** * Calculate the cubic root of a value. For matrices, the function is @@ -792,13 +882,13 @@ declare namespace math { * if false (default) the principal root is returned. * @returns Returns the cubic root of x */ - cbrt(x: number, allRoots?: boolean): number; - cbrt(x: BigNumber, allRoots?: boolean): BigNumber; - cbrt(x: Fraction, allRoots?: boolean): Fraction; - cbrt(x: Complex, allRoots?: boolean): Complex; - cbrt(x: MathArray, allRoots?: boolean): MathArray; - cbrt(x: Matrix, allRoots?: boolean): Matrix; - cbrt(x: Unit, allRoots?: boolean): Unit; + cbrt(x: number, allRoots?: boolean): number + cbrt(x: BigNumber, allRoots?: boolean): BigNumber + cbrt(x: Fraction, allRoots?: boolean): Fraction + cbrt(x: Complex, allRoots?: boolean): Complex + cbrt(x: MathArray, allRoots?: boolean): MathArray + cbrt(x: Matrix, allRoots?: boolean): Matrix + cbrt(x: Unit, allRoots?: boolean): Unit // Rounding functions, grouped for similarity, even though it breaks // the alphabetic order among arithmetic functions. @@ -812,10 +902,10 @@ declare namespace math { * @returns Rounded value */ ceil( - x: T, - n?: number | BigNumber - ): NoLiteralType; - ceil(x: MathNumericType, n: U): U; + x: T, + n?: number | BigNumber + ): NoLiteralType + ceil(x: MathNumericType, n: U): U /** * Round a value towards zero. For matrices, the function is evaluated @@ -825,10 +915,10 @@ declare namespace math { * @returns Rounded value */ fix( - x: T, - n?: number | BigNumber - ): NoLiteralType; - fix(x: MathNumericType, n: U): U; + x: T, + n?: number | BigNumber + ): NoLiteralType + fix(x: MathNumericType, n: U): U /** * Round a value towards minus infinity. For matrices, the function is @@ -838,10 +928,10 @@ declare namespace math { * @returns Rounded value */ floor( - x: T, - n?: number | BigNumber - ): NoLiteralType; - floor(x: MathNumericType, n: U): U; + x: T, + n?: number | BigNumber + ): NoLiteralType + floor(x: MathNumericType, n: U): U /** * Round a value towards the nearest integer. For matrices, the function @@ -851,10 +941,10 @@ declare namespace math { * @returns Rounded value of x */ round( - x: T, - n?: number | BigNumber - ): NoLiteralType; - round(x: MathNumericType, n: U): U; + x: T, + n?: number | BigNumber + ): NoLiteralType + round(x: MathNumericType, n: U): U // End of group of rounding functions @@ -864,13 +954,13 @@ declare namespace math { * @param x Number for which to calculate the cube * @returns Cube of x */ - cube(x: number): number; - cube(x: BigNumber): BigNumber; - cube(x: Fraction): Fraction; - cube(x: Complex): Complex; - cube(x: MathArray): MathArray; - cube(x: Matrix): Matrix; - cube(x: Unit): Unit; + cube(x: number): number + cube(x: BigNumber): BigNumber + cube(x: Fraction): Fraction + cube(x: Complex): Complex + cube(x: MathArray): MathArray + cube(x: Matrix): Matrix + cube(x: Unit): Unit /** * Divide two values, x / y. To divide matrices, x is multiplied with @@ -879,10 +969,10 @@ declare namespace math { * @param y Denominator * @returns Quotient, x / y */ - divide(x: Unit, y: Unit): Unit | number; - divide(x: Unit, y: number): Unit; - divide(x: number, y: number): number; - divide(x: MathType, y: MathType): MathType; + divide(x: Unit, y: Unit): Unit | number + divide(x: Unit, y: number): Unit + divide(x: number, y: number): number + divide(x: MathType, y: MathType): MathType /** * Divide two matrices element wise. The function accepts both matrices @@ -891,7 +981,7 @@ declare namespace math { * @param y Denominator * @returns Quotient, x ./ y */ - dotDivide(x: MathType, y: MathType): MathType; + dotDivide(x: MathType, y: MathType): MathType /** * Multiply two matrices element wise. The function accepts both @@ -900,7 +990,7 @@ declare namespace math { * @param y Right hand value * @returns Multiplication of x and y */ - dotMultiply(x: MathType, y: MathType): MathType; + dotMultiply(x: MathType, y: MathType): MathType /** * Calculates the power of x to y element wise. @@ -908,7 +998,7 @@ declare namespace math { * @param y The exponent * @returns The value of x to the power y */ - dotPow(x: MathType, y: MathType): MathType; + dotPow(x: MathType, y: MathType): MathType /** * Calculate the exponent of a value. For matrices, the function is @@ -916,11 +1006,11 @@ declare namespace math { * @param x A number or matrix to exponentiate * @returns Exponent of x */ - exp(x: number): number; - exp(x: BigNumber): BigNumber; - exp(x: Complex): Complex; - exp(x: MathArray): MathArray; - exp(x: Matrix): Matrix; + exp(x: number): number + exp(x: BigNumber): BigNumber + exp(x: Complex): Complex + exp(x: MathArray): MathArray + exp(x: Matrix): Matrix /** * Calculate the value of subtracting 1 from the exponential value. For @@ -928,13 +1018,11 @@ declare namespace math { * @param x A number or matrix to apply expm1 * @returns Exponent of x */ - expm1(x: number): number; - expm1(x: BigNumber): BigNumber; - expm1(x: Complex): Complex; - expm1(x: MathArray): MathArray; - expm1(x: Matrix): Matrix; - - + expm1(x: number): number + expm1(x: BigNumber): BigNumber + expm1(x: Complex): Complex + expm1(x: MathArray): MathArray + expm1(x: Matrix): Matrix /** * Calculate the greatest common divisor for two or more values or @@ -942,11 +1030,11 @@ declare namespace math { * @param args Two or more integer numbers * @returns The greatest common divisor */ - gcd(...args: number[]): number; - gcd(...args: BigNumber[]): BigNumber; - gcd(...args: Fraction[]): Fraction; - gcd(...args: MathArray[]): MathArray; - gcd(...args: Matrix[]): Matrix; + gcd(...args: number[]): number + gcd(...args: BigNumber[]): BigNumber + gcd(...args: Fraction[]): Fraction + gcd(...args: MathArray[]): MathArray + gcd(...args: Matrix[]): Matrix /** * Calculate the hypotenusa of a list with values. The hypotenusa is @@ -958,8 +1046,8 @@ declare namespace math { * whole matrix. * @returns Returns the hypothenuse of the input values. */ - hypot(...args: number[]): number; - hypot(...args: BigNumber[]): BigNumber; + hypot(...args: number[]): number + hypot(...args: BigNumber[]): BigNumber /** * Calculate the least common multiple for two or more values or arrays. @@ -969,10 +1057,10 @@ declare namespace math { * @param b An integer number * @returns The least common multiple */ - lcm(a: number, b: number): number; - lcm(a: BigNumber, b: BigNumber): BigNumber; - lcm(a: MathArray, b: MathArray): MathArray; - lcm(a: Matrix, b: Matrix): Matrix; + lcm(a: number, b: number): number + lcm(a: BigNumber, b: BigNumber): BigNumber + lcm(a: MathArray, b: MathArray): MathArray + lcm(a: Matrix, b: Matrix): Matrix /** * Calculate the logarithm of a value. For matrices, the function is @@ -982,7 +1070,10 @@ declare namespace math { * natural logarithm of x is calculated. Default value: e. * @returns Returns the logarithm of x */ - log(x: T, base?: number | BigNumber | Complex): NoLiteralType; + log( + x: T, + base?: number | BigNumber | Complex + ): NoLiteralType /** * Calculate the 10-base of a value. This is the same as calculating @@ -990,11 +1081,11 @@ declare namespace math { * @param x Value for which to calculate the logarithm. * @returns Returns the 10-base logarithm of x */ - log10(x: number): number; - log10(x: BigNumber): BigNumber; - log10(x: Complex): Complex; - log10(x: MathArray): MathArray; - log10(x: Matrix): Matrix; + log10(x: number): number + log10(x: BigNumber): BigNumber + log10(x: Complex): Complex + log10(x: MathArray): MathArray + log10(x: Matrix): Matrix /** * Calculate the logarithm of a value+1. For matrices, the function is @@ -1002,11 +1093,11 @@ declare namespace math { * @param x Value for which to calculate the logarithm. * @returns Returns the logarithm of x+1 */ - log1p(x: number, base?: number | BigNumber | Complex): number; - log1p(x: BigNumber, base?: number | BigNumber | Complex): BigNumber; - log1p(x: Complex, base?: number | BigNumber | Complex): Complex; - log1p(x: MathArray, base?: number | BigNumber | Complex): MathArray; - log1p(x: Matrix, base?: number | BigNumber | Complex): Matrix; + log1p(x: number, base?: number | BigNumber | Complex): number + log1p(x: BigNumber, base?: number | BigNumber | Complex): BigNumber + log1p(x: Complex, base?: number | BigNumber | Complex): Complex + log1p(x: MathArray, base?: number | BigNumber | Complex): MathArray + log1p(x: Matrix, base?: number | BigNumber | Complex): Matrix /** * Calculate the 2-base of a value. This is the same as calculating @@ -1014,11 +1105,11 @@ declare namespace math { * @param x Value for which to calculate the logarithm. * @returns Returns the 2-base logarithm of x */ - log2(x: number): number; - log2(x: BigNumber): BigNumber; - log2(x: Complex): Complex; - log2(x: MathArray): MathArray; - log2(x: Matrix): Matrix; + log2(x: number): number + log2(x: BigNumber): BigNumber + log2(x: Complex): Complex + log2(x: MathArray): MathArray + log2(x: Matrix): Matrix /** * Calculates the modulus, the remainder of an integer division. For @@ -1030,9 +1121,9 @@ declare namespace math { * @returns Returns the remainder of x divided by y */ mod( - x: T, - y: number | BigNumber | Fraction | MathCollection - ): NoLiteralType; + x: T, + y: number | BigNumber | Fraction | MathCollection + ): NoLiteralType /** * Multiply two values, x * y. The result is squeezed. For matrices, the @@ -1041,10 +1132,10 @@ declare namespace math { * @param y The second value to multiply * @returns Multiplication of x and y */ - multiply(x: T, y: MathType): T; - multiply(x: Unit, y: Unit): Unit; - multiply(x: number, y: number): number; - multiply(x: MathType, y: MathType): MathType; + multiply(x: T, y: MathType): T + multiply(x: Unit, y: Unit): Unit + multiply(x: number, y: number): number + multiply(x: MathType, y: MathType): MathType /** * Calculate the norm of a number, vector or matrix. The second @@ -1055,7 +1146,10 @@ declare namespace math { * Frobenius norm) Default value: 2. * @returns the p-norm */ - norm(x: number | BigNumber | Complex | MathCollection, p?: number | BigNumber | string): number | BigNumber; + norm( + x: number | BigNumber | Complex | MathCollection, + p?: number | BigNumber | string + ): number | BigNumber /** * Calculate the nth root of a value. The principal nth root of a @@ -1065,7 +1159,10 @@ declare namespace math { * @param root The root. Default value: 2. * @return The nth root of a */ - nthRoot(a: number | BigNumber | MathCollection | Complex, root?: number | BigNumber): number | Complex | MathCollection; + nthRoot( + a: number | BigNumber | MathCollection | Complex, + root?: number | BigNumber + ): number | Complex | MathCollection /** * Calculates the power of x to y, x ^ y. Matrix exponentiation is @@ -1074,7 +1171,7 @@ declare namespace math { * @param y The exponent * @returns x to the power y */ - pow(x: MathType, y: number | BigNumber | Complex): MathType; + pow(x: MathType, y: number | BigNumber | Complex): MathType /** * Compute the sign of a value. The sign of a value x is: 1 when x > 1 @@ -1083,13 +1180,13 @@ declare namespace math { * @param x The number for which to determine the sign * @returns The sign of x */ - sign(x: number): number; - sign(x: BigNumber): BigNumber; - sign(x: Fraction): Fraction; - sign(x: Complex): Complex; - sign(x: MathArray): MathArray; - sign(x: Matrix): Matrix; - sign(x: Unit): Unit; + sign(x: number): number + sign(x: BigNumber): BigNumber + sign(x: Fraction): Fraction + sign(x: Complex): Complex + sign(x: MathArray): MathArray + sign(x: Matrix): Matrix + sign(x: Unit): Unit /** * Calculate the square root of a value. For matrices, the function is @@ -1097,12 +1194,12 @@ declare namespace math { * @param x Value for which to calculate the square root * @returns Returns the square root of x */ - sqrt(x: number): number; - sqrt(x: BigNumber): BigNumber; - sqrt(x: Complex): Complex; - sqrt(x: MathArray): MathArray; - sqrt(x: Matrix): Matrix; - sqrt(x: Unit): Unit; + sqrt(x: number): number + sqrt(x: BigNumber): BigNumber + sqrt(x: Complex): Complex + sqrt(x: MathArray): MathArray + sqrt(x: Matrix): Matrix + sqrt(x: Unit): Unit /** * Compute the square of a value, x * x. For matrices, the function is @@ -1110,13 +1207,13 @@ declare namespace math { * @param x Number for which to calculate the square * @returns Squared value */ - square(x: number): number; - square(x: BigNumber): BigNumber; - square(x: Fraction): Fraction; - square(x: Complex): Complex; - square(x: MathArray): MathArray; - square(x: Matrix): Matrix; - square(x: Unit): Unit; + square(x: number): number + square(x: BigNumber): BigNumber + square(x: Fraction): Fraction + square(x: Complex): Complex + square(x: MathArray): MathArray + square(x: Matrix): Matrix + square(x: Unit): Unit /** * Subtract two values, x - y. For matrices, the function is evaluated @@ -1125,8 +1222,8 @@ declare namespace math { * @param y Value to subtract from x * @returns Subtraction of x and y */ - subtract(x: T, y: T): T; - subtract(x: MathType, y: MathType): MathType; + subtract(x: T, y: T): T + subtract(x: MathType, y: MathType): MathType /** * Inverse the sign of a value, apply a unary minus operation. For @@ -1136,13 +1233,13 @@ declare namespace math { * @param x Number to be inverted * @returns Retursn the value with inverted sign */ - unaryMinus(x: number): number; - unaryMinus(x: BigNumber): BigNumber; - unaryMinus(x: Fraction): Fraction; - unaryMinus(x: Complex): Complex; - unaryMinus(x: MathArray): MathArray; - unaryMinus(x: Matrix): Matrix; - unaryMinus(x: Unit): Unit; + unaryMinus(x: number): number + unaryMinus(x: BigNumber): BigNumber + unaryMinus(x: Fraction): Fraction + unaryMinus(x: Complex): Complex + unaryMinus(x: MathArray): MathArray + unaryMinus(x: Matrix): Matrix + unaryMinus(x: Unit): Unit /** * Unary plus operation. Boolean values and strings will be converted to @@ -1152,14 +1249,14 @@ declare namespace math { * @returns Returns the input value when numeric, converts to a number * when input is non-numeric. */ - unaryPlus(x: number): number; - unaryPlus(x: BigNumber): BigNumber; - unaryPlus(x: Fraction): Fraction; - unaryPlus(x: string): string; - unaryPlus(x: Complex): Complex; - unaryPlus(x: MathArray): MathArray; - unaryPlus(x: Matrix): Matrix; - unaryPlus(x: Unit): Unit; + unaryPlus(x: number): number + unaryPlus(x: BigNumber): BigNumber + unaryPlus(x: Fraction): Fraction + unaryPlus(x: string): string + unaryPlus(x: Complex): Complex + unaryPlus(x: MathArray): MathArray + unaryPlus(x: Matrix): Matrix + unaryPlus(x: Unit): Unit /** * Calculate the extended greatest common divisor for two values. See @@ -1169,7 +1266,7 @@ declare namespace math { * @returns Returns an array containing 3 integers [div, m, n] where div * = gcd(a, b) and a*m + b*n = div */ - xgcd(a: number | BigNumber, b: number | BigNumber): MathArray; + xgcd(a: number | BigNumber, b: number | BigNumber): MathArray /************************************************************************* * Bitwise functions @@ -1182,7 +1279,10 @@ declare namespace math { * @param y Second value to and * @returns AND of x and y */ - bitAnd(x: T, y: number | BigNumber | MathCollection): NoLiteralType; + bitAnd( + x: T, + y: number | BigNumber | MathCollection + ): NoLiteralType /** * Bitwise NOT value, ~x. For matrices, the function is evaluated @@ -1191,10 +1291,10 @@ declare namespace math { * @param x Value to not * @returns NOT of x */ - bitNot(x: number): number; - bitNot(x: BigNumber): BigNumber; - bitNot(x: MathArray): MathArray; - bitNot(x: Matrix): Matrix; + bitNot(x: number): number + bitNot(x: BigNumber): BigNumber + bitNot(x: MathArray): MathArray + bitNot(x: Matrix): Matrix /** * Bitwise OR two values, x | y. For matrices, the function is evaluated @@ -1204,10 +1304,10 @@ declare namespace math { * @param y Second value to or * @returns OR of x and y */ - bitOr(x: number, y: number): number; - bitOr(x: BigNumber, y: BigNumber): BigNumber; - bitOr(x: MathArray, y: MathArray): MathArray; - bitOr(x: Matrix, y: Matrix): Matrix; + bitOr(x: number, y: number): number + bitOr(x: BigNumber, y: BigNumber): BigNumber + bitOr(x: MathArray, y: MathArray): MathArray + bitOr(x: Matrix, y: Matrix): Matrix /** * Bitwise XOR two values, x ^ y. For matrices, the function is @@ -1216,7 +1316,10 @@ declare namespace math { * @param y Second value to xor * @returns XOR of x and y */ - bitXor(x: T, y: number | BigNumber | MathCollection): NoLiteralType; + bitXor( + x: T, + y: number | BigNumber | MathCollection + ): NoLiteralType /** * Bitwise left logical shift of a value x by y number of bits, x << y. @@ -1226,7 +1329,10 @@ declare namespace math { * @param y Amount of shifts * @returns x shifted left y times */ - leftShift(x: T, y: number | BigNumber): NoLiteralType; + leftShift( + x: T, + y: number | BigNumber + ): NoLiteralType /** * Bitwise right arithmetic shift of a value x by y number of bits, x >> @@ -1236,7 +1342,10 @@ declare namespace math { * @param y Amount of shifts * @returns x sign-filled shifted right y times */ - rightArithShift(x: T, y: number | BigNumber): NoLiteralType; + rightArithShift( + x: T, + y: number | BigNumber + ): NoLiteralType /** * Bitwise right logical shift of value x by y number of bits, x >>> y. @@ -1246,7 +1355,10 @@ declare namespace math { * @param y Amount of shifts * @returns x zero-filled shifted right y times */ - rightLogShift(x: T, y: number): NoLiteralType; + rightLogShift( + x: T, + y: number + ): NoLiteralType /************************************************************************* * Combinatorics functions @@ -1260,8 +1372,8 @@ declare namespace math { * @param n Total number of objects in the set * @returns B(n) */ - bellNumbers(n: number): number; - bellNumbers(n: BigNumber): BigNumber; + bellNumbers(n: number): number + bellNumbers(n: BigNumber): BigNumber /** * The Catalan Numbers enumerate combinatorial structures of many @@ -1270,8 +1382,8 @@ declare namespace math { * @param n nth Catalan number * @returns Cn(n) */ - catalan(n: number): number; - catalan(n: BigNumber): BigNumber; + catalan(n: number): number + catalan(n: BigNumber): BigNumber /** * The composition counts of n into k parts. Composition only takes @@ -1280,7 +1392,10 @@ declare namespace math { * @param k Number of objects in the subset * @returns Returns the composition counts of n into k parts. */ - composition(n: T, k: number | BigNumber): NoLiteralType; + composition( + n: T, + k: number | BigNumber + ): NoLiteralType /** * The Stirling numbers of the second kind, counts the number of ways to @@ -1292,7 +1407,10 @@ declare namespace math { * @param k Number of objects in the subset * @returns S(n,k) */ - stirlingS2(n: T, k: number | BigNumber): NoLiteralType; + stirlingS2( + n: T, + k: number | BigNumber + ): NoLiteralType /************************************************************************* * Complex functions @@ -1305,10 +1423,10 @@ declare namespace math { * @param x A complex number or array with complex numbers * @returns The argument of x */ - arg(x: number | Complex): number; - arg(x: BigNumber | Complex): BigNumber; - arg(x: MathArray): MathArray; - arg(x: Matrix): Matrix; + arg(x: number | Complex): number + arg(x: BigNumber | Complex): BigNumber + arg(x: MathArray): MathArray + arg(x: Matrix): Matrix /** * Compute the complex conjugate of a complex value. If x = a+bi, the @@ -1317,7 +1435,9 @@ declare namespace math { * @param x A complex number or array with complex numbers * @returns The complex conjugate of x */ - conj(x: T): NoLiteralType; + conj( + x: T + ): NoLiteralType /** * Get the imaginary part of a complex number. For a complex number a + @@ -1326,7 +1446,9 @@ declare namespace math { * @param x A complex number or array with complex numbers * @returns The imaginary part of x */ - im(x: number | BigNumber | Complex | MathCollection): number | BigNumber | MathCollection; + im( + x: number | BigNumber | Complex | MathCollection + ): number | BigNumber | MathCollection /** * Get the real part of a complex number. For a complex number a + bi, @@ -1335,7 +1457,9 @@ declare namespace math { * @param x A complex number or array of complex numbers * @returns The real part of x */ - re(x: number | BigNumber | Complex | MathCollection): number | BigNumber | MathCollection; + re( + x: number | BigNumber | Complex | MathCollection + ): number | BigNumber | MathCollection /************************************************************************* * Geometry functions @@ -1353,7 +1477,10 @@ declare namespace math { * @param y Coordinates of the second point * @returns Returns the distance from two/three points */ - distance(x: MathCollection | object, y: MathCollection | object): number | BigNumber; + distance( + x: MathCollection | object, + y: MathCollection | object + ): number | BigNumber /** * Calculates the point of intersection of two lines in two or three @@ -1370,7 +1497,12 @@ declare namespace math { * the calculation is for line and plane * @returns Returns the point of intersection of lines/lines-planes */ - intersect(w: MathCollection, x: MathCollection, y: MathCollection, z: MathCollection): MathArray; + intersect( + w: MathCollection, + x: MathCollection, + y: MathCollection, + z: MathCollection + ): MathArray /************************************************************************* * Logical functions @@ -1386,9 +1518,9 @@ declare namespace math { * nonzero/nonempty value. */ and( - x: number | BigNumber | Complex | Unit | MathCollection, - y: number | BigNumber | Complex | Unit | MathCollection - ): boolean | MathCollection; + x: number | BigNumber | Complex | Unit | MathCollection, + y: number | BigNumber | Complex | Unit | MathCollection + ): boolean | MathCollection /** * Logical not. Flips boolean value of a given parameter. For matrices, @@ -1396,7 +1528,9 @@ declare namespace math { * @param x First value to not * @returns Returns true when input is a zero or empty value. */ - not(x: number | BigNumber | Complex | Unit | MathCollection): boolean | MathCollection; + not( + x: number | BigNumber | Complex | Unit | MathCollection + ): boolean | MathCollection /** * Logical or. Test if at least one value is defined with a @@ -1408,9 +1542,9 @@ declare namespace math { * nonzero/nonempty value. */ or( - x: number | BigNumber | Complex | Unit | MathCollection, - y: number | BigNumber | Complex | Unit | MathCollection - ): boolean | MathCollection; + x: number | BigNumber | Complex | Unit | MathCollection, + y: number | BigNumber | Complex | Unit | MathCollection + ): boolean | MathCollection /** * Logical xor. Test whether one and only one value is defined with a @@ -1422,9 +1556,9 @@ declare namespace math { * nonzero/nonempty value. */ xor( - x: number | BigNumber | Complex | Unit | MathCollection, - y: number | BigNumber | Complex | Unit | MathCollection - ): boolean | MathCollection; + x: number | BigNumber | Complex | Unit | MathCollection, + y: number | BigNumber | Complex | Unit | MathCollection + ): boolean | MathCollection /************************************************************************* * Matrix functions @@ -1440,8 +1574,11 @@ declare namespace math { * array or 1-d matrix as an input and return a number. * @returns The residual matrix with the function applied over some dimension. */ - apply(array: T, dim: number, callback: (array: MathCollection) => number): T - + apply( + array: T, + dim: number, + callback: (array: MathCollection) => number + ): T /** * Concatenate two or more matrices. dim: number is a zero-based @@ -1450,7 +1587,7 @@ declare namespace math { * @param args Two or more matrices * @returns Concatenated matrix */ - concat(...args: Array): MathCollection; + concat(...args: Array): MathCollection /** * Calculate the cross product for two vectors in three dimensional @@ -1461,14 +1598,14 @@ declare namespace math { * @param y Second vector * @returns Returns the cross product of x and y */ - cross(x: MathCollection, y: MathCollection): Matrix | MathArray; + cross(x: MathCollection, y: MathCollection): Matrix | MathArray /** * Calculate the determinant of a matrix. * @param x A Matrix * @returns the determinant of x */ - det(x: MathCollection): number; + det(x: MathCollection): number /** * Create a diagonal matrix or retrieve the diagonal of a matrix. When x @@ -1484,8 +1621,12 @@ declare namespace math { * @returns Diagonal matrix from input vector, or diagonal from input * matrix */ - diag(X: MathCollection, format?: string): Matrix; - diag(X: MathCollection, k: number | BigNumber, format?: string): Matrix | MathArray; + diag(X: MathCollection, format?: string): Matrix + diag( + X: MathCollection, + k: number | BigNumber, + format?: string + ): Matrix | MathArray /** * Calculate the dot product of two vectors. The dot product of A = [a1, @@ -1495,7 +1636,7 @@ declare namespace math { * @param y Second vector * @returns Returns the dot product of x and y */ - dot(x: MathCollection, y: MathCollection): number; + dot(x: MathCollection, y: MathCollection): number /** * Compute eigenvalues and eigenvectors of a matrix. @@ -1510,7 +1651,10 @@ declare namespace math { * @param prec Precision, default value: 1e-15 * @returns Object containing an array of eigenvalues and a matrix with eigenvectors as columns. */ - eigs(x: MathCollection, prec?:number|BigNumber): {values: MathCollection, vectors: MathCollection} + eigs( + x: MathCollection, + prec?: number | BigNumber + ): { values: MathCollection; vectors: MathCollection } /** * Compute the matrix exponential, expm(A) = e^A. The matrix must be @@ -1521,7 +1665,7 @@ declare namespace math { * @param x A square matrix * @returns The exponential of x */ - expm(x: Matrix): Matrix; + expm(x: Matrix): Matrix /** * Create a 2-dimensional identity matrix with size m x n or n x n. The @@ -1530,14 +1674,17 @@ declare namespace math { * @param format The Matrix storage format * @returns A matrix with ones on the diagonal */ - identity(size: number | number[] | Matrix | MathArray, format?: string): Matrix | MathArray | number; + identity( + size: number | number[] | Matrix | MathArray, + format?: string + ): Matrix | MathArray | number /** * @param m The x dimension for the matrix * @param n The y dimension for the matrix * @param format The Matrix storage format * @returns A matrix with ones on the diagonal */ - identity(m: number, n: number, format?: string): Matrix | MathArray | number; + identity(m: number, n: number, format?: string): Matrix | MathArray | number /** * Filter the items in an array or one dimensional matrix. @@ -1549,16 +1696,24 @@ declare namespace math { * traversed. The function must return a boolean. */ filter( - x: Matrix | MathArray | string[], - test: ((value: any, index: any, matrix: Matrix | MathArray | string[]) => boolean) | RegExp - ): Matrix | MathArray; + x: Matrix | MathArray | string[], + test: + | (( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + value: any, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + index: any, + matrix: Matrix | MathArray | string[] + ) => boolean) + | RegExp + ): Matrix | MathArray /** * Flatten a multi dimensional matrix into a single dimensional matrix. * @param x Matrix to be flattened * @returns Returns the flattened matrix */ - flatten(x: T): T; + flatten(x: T): T /** * Iterate over all elements of a matrix/array, and executes the given @@ -1568,14 +1723,18 @@ declare namespace math { * parameters: the value of the element, the index of the element, and * the Matrix/array being traversed. */ - forEach(x: T, callback: (value: any, index: any, matrix: T) => void): void; + forEach( + x: T, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + callback: (value: any, index: any, matrix: T) => void + ): void /** * Calculate the inverse of a square matrix. * @param x Matrix to be inversed * @returns The inverse of x */ - inv(x: T): NoLiteralType; + inv(x: T): NoLiteralType /** * Calculate the kronecker product of two matrices or vectors @@ -1583,7 +1742,7 @@ declare namespace math { * @param y Second vector * @returns Returns the kronecker product of x and y */ - kron(x: Matrix | MathArray, y: Matrix | MathArray): Matrix; + kron(x: Matrix | MathArray, y: Matrix | MathArray): Matrix /** * Iterate over all elements of a matrix/array, and executes the given @@ -1594,7 +1753,11 @@ declare namespace math { * the Matrix/array being traversed. * @returns Transformed map of x */ - map(x: T, callback: (value: any, index: any, matrix: T) => MathType | string): T; + map( + x: T, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + callback: (value: any, index: any, matrix: T) => MathType | string + ): T /** * Create a matrix filled with ones. The created matrix can have one or @@ -1603,14 +1766,14 @@ declare namespace math { * @param format The matrix storage format * @returns A matrix filled with ones */ - ones(size: number | number[], format?: string): MathCollection; + ones(size: number | number[], format?: string): MathCollection /** * @param m The x dimension of the matrix * @param n The y dimension of the amtrix * @param format The matrix storage format * @returns A matrix filled with ones */ - ones(m: number, n: number, format?: string): MathCollection; + ones(m: number, n: number, format?: string): MathCollection /** * Partition-based selection of an array or 1D matrix. Will find the kth @@ -1622,7 +1785,13 @@ declare namespace math { * and 0 when a == b. Default value: 'asc'. * @returns Returns the kth lowest value. */ - partitionSelect(x: MathCollection, k: number, compare?: 'asc' | 'desc' | ((a: any, b: any) => number)): any; + partitionSelect( + x: MathCollection, + k: number, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + compare?: 'asc' | 'desc' | ((a: any, b: any) => number) + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ): any /** * Create an array from a range. By default, the range end is excluded. @@ -1637,9 +1806,18 @@ declare namespace math { * @returns Parameters describing the ranges start, end, and optional * step. */ - range(str: string, includeEnd?: boolean): Matrix; - range(start: number | BigNumber, end: number | BigNumber, includeEnd?: boolean): Matrix; - range(start: number | BigNumber, end: number | BigNumber, step: number | BigNumber, includeEnd?: boolean): Matrix; + range(str: string, includeEnd?: boolean): Matrix + range( + start: number | BigNumber, + end: number | BigNumber, + includeEnd?: boolean + ): Matrix + range( + start: number | BigNumber, + end: number | BigNumber, + step: number | BigNumber, + includeEnd?: boolean + ): Matrix /** * Reshape a multi dimensional array to fit the specified dimensions @@ -1648,7 +1826,7 @@ declare namespace math { * dimension * @returns A reshaped clone of matrix x */ - reshape(x: T, sizes: number[]): T; + reshape(x: T, sizes: number[]): T /** * Resize a matrix @@ -1658,7 +1836,11 @@ declare namespace math { * that case defaultValue = ' ' Default value: 0. * @returns A resized clone of matrix x */ - resize(x: T, size: MathCollection, defaultValue?: number | string): T; + resize( + x: T, + size: MathCollection, + defaultValue?: number | string + ): T /** * Return a row from a Matrix. @@ -1666,10 +1848,7 @@ declare namespace math { * @param row The index of the row * @returns The retrieved row */ - row( - value: T, - row: number - ): T; + row(value: T, row: number): T /** * Return a column from a Matrix. @@ -1677,10 +1856,7 @@ declare namespace math { * @param column The index of the column * @returns The retrieved column */ - column( - value: T, - column: number - ): T; + column(value: T, column: number): T /** * Return a rotated matrix. @@ -1689,18 +1865,20 @@ declare namespace math { * @param {Array | Matrix} [v] Rotation axis * @return {Array | Matrix} Multiplication of the rotation matrix and w */ - rotate( - w: T, - theta: number | BigNumber | Complex | Unit, - v?: T - ): T; + rotate( + w: T, + theta: number | BigNumber | Complex | Unit, + v?: T + ): T /** * Calculate the size of a matrix or scalar. * @param A matrix * @returns A vector with the size of x */ - size(x: boolean | number | Complex | Unit | string | MathCollection): MathCollection; + size( + x: boolean | number | Complex | Unit | string | MathCollection + ): MathCollection /** * Sort the items in a matrix @@ -1710,7 +1888,11 @@ declare namespace math { * b, and 0 when a == b. Default value: ‘asc’ * @returns Returns the sorted matrix */ - sort(x: T, compare: ((a: any, b: any) => number) | 'asc' | 'desc' | 'natural'): T; + sort( + x: T, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + compare: ((a: any, b: any) => number) | 'asc' | 'desc' | 'natural' + ): T /** * Calculate the principal square root of a square matrix. The principal @@ -1718,7 +1900,7 @@ declare namespace math { * @param A The square matrix A * @returns The principal square root of matrix A */ - sqrtm(A: T): T; + sqrtm(A: T): T /** * Squeeze a matrix, remove inner and outer singleton dimensions from a @@ -1726,7 +1908,7 @@ declare namespace math { * @param x Matrix to be squeezed * @returns Squeezed matrix */ - squeeze(x: T): T; + squeeze(x: T): T /** * Get or set a subset of a matrix or string. @@ -1740,7 +1922,14 @@ declare namespace math { * undefined. Default value: undefined. * @returns Either the retrieved subset or the updated matrix */ - subset(value: T, index: Index, replacement?: any, defaultValue?: any): T; + subset( + value: T, + index: Index, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + replacement?: any, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + defaultValue?: any + ): T /** * Calculate the trace of a matrix: the sum of the elements on the main @@ -1748,7 +1937,7 @@ declare namespace math { * @param x A matrix * @returns The trace of x */ - trace(x: MathCollection): number; + trace(x: MathCollection): number /** * Transpose a matrix. All values of the matrix are reflected over its @@ -1756,7 +1945,7 @@ declare namespace math { * @param x Matrix to be transposed * @returns The transposed matrix */ - transpose(x: T): T; + transpose(x: T): T /** * Create a matrix filled with zeros. The created matrix can have one or @@ -1765,14 +1954,14 @@ declare namespace math { * @param format The matrix storage format * @returns A matrix filled with zeros */ - zeros(size: number | number[], format?: string): MathCollection; + zeros(size: number | number[], format?: string): MathCollection /** * @param m The x dimension of the matrix * @param n The y dimension of the matrix * @param format The matrix storage format * @returns A matrix filled with zeros */ - zeros(m: number, n: number, format?: string): MathCollection; + zeros(m: number, n: number, format?: string): MathCollection /************************************************************************* * Probability functions @@ -1786,7 +1975,10 @@ declare namespace math { * @param k Number of objects in the subset * @returns Number of possible combinations */ - combinations(n: T, k: number | BigNumber): NoLiteralType; + combinations( + n: T, + k: number | BigNumber + ): NoLiteralType /** * Compute the factorial of a value Factorial only supports an integer @@ -1795,7 +1987,9 @@ declare namespace math { * @param n An integer number * @returns The factorial of n */ - factorial(n: T): NoLiteralType; + factorial( + n: T + ): NoLiteralType /** * Compute the gamma function of a value using Lanczos approximation for @@ -1804,7 +1998,9 @@ declare namespace math { * @param n A real or complex number * @returns The gamma of n */ - gamma(n: T): NoLiteralType; + gamma( + n: T + ): NoLiteralType /** * Calculate the Kullback-Leibler (KL) divergence between two @@ -1813,14 +2009,14 @@ declare namespace math { * @param p Second vector * @returns Returns disance between q and p */ - kldivergence(q: MathCollection, p: MathCollection): number; + kldivergence(q: MathCollection, p: MathCollection): number /** * Compute the log gamma function of a value, using Lanczos approximation for numbers and Stirling series for complex numbers. * @param n A real or complex number * @returns The log gamma of `n` */ - lgamma(n: T): NoLiteralType; + lgamma(n: T): NoLiteralType /** * Multinomial Coefficients compute the number of ways of picking a1, @@ -1830,7 +2026,7 @@ declare namespace math { * @param a Integer number of objects in the subset * @returns multinomial coefficent */ - multinomial(a: T[]): NoLiteralType; + multinomial(a: T[]): NoLiteralType /** * Compute the number of ways of obtaining an ordered subset of k @@ -1840,7 +2036,10 @@ declare namespace math { * @param k The number of objects in the subset * @returns The number of permutations */ - permutations(n: T, k?: number | BigNumber): NoLiteralType; + permutations( + n: T, + k?: number | BigNumber + ): NoLiteralType /** * Random pick a value from a one dimensional array. Array element is @@ -1852,7 +2051,11 @@ declare namespace math { * undefined. Returns an array with the configured number of elements * when number is > 1. */ - pickRandom(array: number[], number?: number, weights?: number[]): number | number[]; + pickRandom( + array: number[], + number?: number, + weights?: number[] + ): number | number[] /** * Return a random number larger or equal to min and smaller than max @@ -1863,8 +2066,8 @@ declare namespace math { * @param max Maximum boundary for the random value, excluded * @returns A random number */ - random(min?: number, max?: number): number; - random(size: T, min?: number, max?: number): T; + random(min?: number, max?: number): number + random(size: T, min?: number, max?: number): T /** * Return a random integer number larger or equal to min and smaller @@ -1875,8 +2078,8 @@ declare namespace math { * @param max Maximum boundary for the random value, excluded * @returns A random number */ - randomInt(min: number, max?: number): number; - randomInt(size: T, min?: number, max?: number): T; + randomInt(min: number, max?: number): number + randomInt(size: T, min?: number, max?: number): T /************************************************************************* * Relational functions @@ -1893,7 +2096,10 @@ declare namespace math { * @returns Returns the result of the comparison: 1 when x > y, -1 when * x < y, and 0 when x == y. */ - compare(x: MathType | string, y: MathType | string): number | BigNumber | Fraction | MathCollection; + compare( + x: MathType | string, + y: MathType | string + ): number | BigNumber | Fraction | MathCollection /** * Compare two values of any type in a deterministic, natural way. For @@ -1905,7 +2111,8 @@ declare namespace math { * @returns Returns the result of the comparison: 1 when x > y, -1 when * x < y, and 0 when x == y. */ - compareNatural(x: any, y: any): number; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + compareNatural(x: any, y: any): number /** * Compare two strings lexically. Comparison is case sensitive. Returns @@ -1916,7 +2123,10 @@ declare namespace math { * @returns Returns the result of the comparison: 1 when x > y, -1 when * x < y, and 0 when x == y. */ - compareText(x: string | MathCollection, y: string | MathCollection): number | MathCollection; + compareText( + x: string | MathCollection, + y: string | MathCollection + ): number | MathCollection /** * Test element wise whether two matrices are equal. The function @@ -1926,7 +2136,10 @@ declare namespace math { * @returns Returns true when the input matrices have the same size and * each of their elements is equal. */ - deepEqual(x: MathType, y: MathType): number | BigNumber | Fraction | Complex | Unit | MathCollection; + deepEqual( + x: MathType, + y: MathType + ): number | BigNumber | Fraction | Complex | Unit | MathCollection /** * Test whether two values are equal. @@ -1943,7 +2156,7 @@ declare namespace math { * @returns Returns true when the compared values are equal, else * returns false */ - equal(x: MathType | string, y: MathType | string): boolean | MathCollection; + equal(x: MathType | string, y: MathType | string): boolean | MathCollection /** * Check equality of two strings. Comparison is case sensitive. For @@ -1952,7 +2165,10 @@ declare namespace math { * @param y Second string to compare * @returns Returns true if the values are equal, and false if not. */ - equalText(x: string | MathCollection, y: string | MathCollection): number | MathCollection; + equalText( + x: string | MathCollection, + y: string | MathCollection + ): number | MathCollection /** * Test whether value x is larger than y. The function returns true when @@ -1964,7 +2180,7 @@ declare namespace math { * @param y Second value to vcompare * @returns Returns true when x is larger than y, else returns false */ - larger(x: MathType | string, y: MathType | string): boolean | MathCollection; + larger(x: MathType | string, y: MathType | string): boolean | MathCollection /** * Test whether value x is larger or equal to y. The function returns @@ -1977,7 +2193,10 @@ declare namespace math { * @returns Returns true when x is larger than or equal to y, else * returns false */ - largerEq(x: MathType | string, y: MathType | string): boolean | MathCollection; + largerEq( + x: MathType | string, + y: MathType | string + ): boolean | MathCollection /** * Test whether value x is smaller than y. The function returns true @@ -1989,7 +2208,10 @@ declare namespace math { * @param y Second value to vcompare * @returns Returns true when x is smaller than y, else returns false */ - smaller(x: MathType | string, y: MathType | string): boolean | MathCollection; + smaller( + x: MathType | string, + y: MathType | string + ): boolean | MathCollection /** * Test whether value x is smaller or equal to y. The function returns @@ -2002,7 +2224,10 @@ declare namespace math { * @returns Returns true when x is smaller than or equal to y, else * returns false */ - smallerEq(x: MathType | string, y: MathType | string): boolean | MathCollection; + smallerEq( + x: MathType | string, + y: MathType | string + ): boolean | MathCollection /** * Test whether two values are unequal. The function tests whether the @@ -2018,7 +2243,10 @@ declare namespace math { * @returns Returns true when the compared values are unequal, else * returns false */ - unequal(x: MathType | string, y: MathType | string): boolean | MathCollection; + unequal( + x: MathType | string, + y: MathType | string + ): boolean | MathCollection /************************************************************************* * Set functions @@ -2032,7 +2260,7 @@ declare namespace math { * @param a2 A (multi)set * @returns The cartesian product of two (multi)sets */ - setCartesian(a1: T, a2: MathCollection): T; + setCartesian(a1: T, a2: MathCollection): T /** * Create the difference of two (multi)sets: every element of set1, that @@ -2042,7 +2270,7 @@ declare namespace math { * @param a2 A (multi)set * @returns The difference of two (multi)sets */ - setDifference(a1: T, a2: MathCollection): T; + setDifference(a1: T, a2: MathCollection): T /** * Collect the distinct elements of a multiset. A multi-dimension array @@ -2050,7 +2278,7 @@ declare namespace math { * @param a A multiset * @returns A set containing the distinct elements of the multiset */ - setDistinct(a: T): T; + setDistinct(a: T): T /** * Create the intersection of two (multi)sets. Multi-dimension arrays @@ -2059,7 +2287,7 @@ declare namespace math { * @param a2 A (multi)set * @returns The intersection of two (multi)sets */ - setIntersect(a1: T, a2: MathCollection): T; + setIntersect(a1: T, a2: MathCollection): T /** * Check whether a (multi)set is a subset of another (multi)set. (Every @@ -2069,7 +2297,7 @@ declare namespace math { * @param a2 A (multi)set * @returns True if a1 is subset of a2, else false */ - setIsSubset(a1: MathCollection, a2: MathCollection): boolean; + setIsSubset(a1: MathCollection, a2: MathCollection): boolean /** * Count the multiplicity of an element in a multiset. A multi-dimension @@ -2080,7 +2308,10 @@ declare namespace math { * @returns The number of how many times the multiset contains the * element */ - setMultiplicity(e: number | BigNumber | Fraction | Complex, a: MathCollection): number; + setMultiplicity( + e: number | BigNumber | Fraction | Complex, + a: MathCollection + ): number /** * Create the powerset of a (multi)set. (The powerset contains very @@ -2089,7 +2320,7 @@ declare namespace math { * @param a A multiset * @returns The powerset of the (multi)set */ - setPowerset(a: T): T; + setPowerset(a: T): T /** * Count the number of elements of a (multi)set. When a second parameter @@ -2098,7 +2329,7 @@ declare namespace math { * @param a A multiset * @returns The number of elements of the (multi)set */ - setSize(a: MathCollection): number; + setSize(a: MathCollection): number /** * Create the symmetric difference of two (multi)sets. Multi-dimension @@ -2108,7 +2339,7 @@ declare namespace math { * @param a2 A (multi)set * @returns The symmetric difference of two (multi)sets */ - setSymDifference(a1: T, a2: MathCollection): T; + setSymDifference(a1: T, a2: MathCollection): T /** * Create the union of two (multi)sets. Multi-dimension arrays will be @@ -2117,7 +2348,7 @@ declare namespace math { * @param a2 A (multi)set * @returns The union of two (multi)sets */ - setUnion(a1: T, a2: MathCollection): T; + setUnion(a1: T, a2: MathCollection): T /************************************************************************* * Special functions @@ -2129,7 +2360,7 @@ declare namespace math { * @param x A real number * @returns The erf of x */ - erf(x: T): NoLiteralType; + erf(x: T): NoLiteralType /************************************************************************* * Statistics functions @@ -2142,7 +2373,8 @@ declare namespace math { * @param array A single matrix or multiple scalar values. * @returns The median absolute deviation */ - mad(array: MathCollection): any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + mad(array: MathCollection): any /** * Compute the maximum value of a matrix or a list with values. In case @@ -2152,13 +2384,15 @@ declare namespace math { * @param args A single matrix or multiple scalar values * @returns The maximum value */ - max(...args: MathType[]): any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + max(...args: MathType[]): any /** * @param A A single matrix * @param dim The maximum over the selected dimension * @returns The maximum value */ - max(A: MathCollection, dim?: number): any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + max(A: MathCollection, dim?: number): any /** * Compute the mean value of matrix or a list with values. In case of a @@ -2168,13 +2402,15 @@ declare namespace math { * @param args A single matrix or multiple scalar values * @returns The mean of all values */ - mean(...args: MathType[]): any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + mean(...args: MathType[]): any /** * @param A A single matrix * @param dim The mean over the selected dimension * @returns The mean of all values */ - mean(A: MathCollection, dim?: number): any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + mean(A: MathCollection, dim?: number): any /** * Compute the median of a matrix or a list with values. The values are @@ -2186,7 +2422,8 @@ declare namespace math { * @param args A single matrix or or multiple scalar values * @returns The median */ - median(...args: MathType[]): any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + median(...args: MathType[]): any /** * Compute the maximum value of a matrix or a list of values. In case of @@ -2196,13 +2433,15 @@ declare namespace math { * @param args A single matrix or or multiple scalar values * @returns The minimum value */ - min(...args: MathType[]): any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + min(...args: MathType[]): any /** * @param A A single matrix * @param dim The minimum over the selected dimension * @returns The minimum value */ - min(A: MathCollection, dim?: number): any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + min(A: MathCollection, dim?: number): any /** * Computes the mode of a set of numbers or a list with values(numbers @@ -2211,7 +2450,8 @@ declare namespace math { * @param args A single matrix * @returns The mode of all values */ - mode(...args: MathType[]): any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + mode(...args: MathType[]): any /** * Compute the product of a matrix or a list with values. In case of a @@ -2220,7 +2460,8 @@ declare namespace math { * @param args A single matrix or multiple scalar values * @returns The product of all values */ - prod(...args: MathType[]): any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + prod(...args: MathType[]): any /** * Compute the prob order quantile of a matrix or a list with values. @@ -2236,7 +2477,11 @@ declare namespace math { * @param sorted =false is data sorted in ascending order * @returns Quantile(s) */ - quantileSeq(A: MathCollection, prob: number | BigNumber | MathArray, sorted?: boolean): number | BigNumber | Unit | MathArray; + quantileSeq( + A: MathCollection, + prob: number | BigNumber | MathArray, + sorted?: boolean + ): number | BigNumber | Unit | MathArray /** * Compute the standard deviation of a matrix or a list with values. The @@ -2269,7 +2514,11 @@ declare namespace math { * ‘unbiased’. * @returns The standard deviation array */ - std(array: MathCollection, dimension?: number, normalization?: 'unbiased' | 'uncorrected' | 'biased'): number[] + std( + array: MathCollection, + dimension?: number, + normalization?: 'unbiased' | 'uncorrected' | 'biased' + ): number[] /** * Compute the standard deviation of a matrix or a list with values. The * standard deviations is defined as the square root of the variance: @@ -2286,7 +2535,10 @@ declare namespace math { * ‘unbiased’. * @returns The standard deviation */ - std(array: MathCollection, normalization: 'unbiased' | 'uncorrected' | 'biased'): number + std( + array: MathCollection, + normalization: 'unbiased' | 'uncorrected' | 'biased' + ): number /** * Compute the sum of a matrix or a list with values. In case of a @@ -2295,12 +2547,14 @@ declare namespace math { * @param args A single matrix or multiple scalar values * @returns The sum of all values */ - sum(...args: Array): any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + sum(...args: Array): any /** * @param array A single matrix * @returns The sum of all values */ - sum(array: MathCollection): any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + sum(array: MathCollection): any /** * Compute the cumulative sum of a matrix or a list with values. @@ -2309,13 +2563,13 @@ declare namespace math { * @param args A single matrix or multiple scalar values * @returns The cumulative sums of the the values. */ - cumsum(...args: MathType[]): MathType[]; + cumsum(...args: MathType[]): MathType[] /** * @param array A single matrix * @param dim The dimension along which to sum (defaults to 0) * @returns The cumulative sums along the given dimension */ - cumsum(array: MathCollection, dim?: number): MathCollection; + cumsum(array: MathCollection, dim?: number): MathCollection /** * Compute the variance of a matrix or a list with values. In case of a @@ -2331,7 +2585,7 @@ declare namespace math { * @param args A single matrix or multiple scalar values * @returns The variance */ - variance(...args: Array): number; + variance(...args: Array): number /** * Compute the variance of a matrix or a list with values. In case of a * (multi dimensional) array or matrix, the variance over all elements @@ -2350,7 +2604,11 @@ declare namespace math { * Default value: ‘unbiased’. * @returns variance matrix. */ - variance(array: MathCollection, dimension?: number, normalization?: 'unbiased' | 'uncorrected' | 'biased'): number[]; + variance( + array: MathCollection, + dimension?: number, + normalization?: 'unbiased' | 'uncorrected' | 'biased' + ): number[] /** * @param array A single matrix * @param normalization normalization Determines how to normalize the @@ -2358,7 +2616,10 @@ declare namespace math { * Default value: ‘unbiased’. * @returns The variance */ - variance(array: MathCollection, normalization: 'unbiased' | 'uncorrected' | 'biased'): number; + variance( + array: MathCollection, + normalization: 'unbiased' | 'uncorrected' | 'biased' + ): number /************************************************************************* * String functions @@ -2377,7 +2638,14 @@ declare namespace math { * @see http://mathjs.org/docs/reference/functions/format.html * @returns The formatted value */ - format(value: any, options?: FormatOptions | number | ((item: any) => string), callback?: (value: any) => string): string; + format( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + value: any, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + options?: FormatOptions | number | ((item: any) => string), + // eslint-disable-next-line @typescript-eslint/no-explicit-any + callback?: (value: any) => string + ): string /** * Interpolate values into a string template. @@ -2390,7 +2658,13 @@ declare namespace math { * numbers. See function math.format for a description of all options. * @returns Interpolated string */ - print(template: string, values: any, precision?: number, options?: number | object): void; + print( + template: string, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + values: any, + precision?: number, + options?: number | object + ): void /************************************************************************* * Trigonometry functions @@ -2402,11 +2676,11 @@ declare namespace math { * @param x Function input * @returns The arc cosine of x */ - acos(x: number): number; - acos(x: BigNumber): BigNumber; - acos(x: Complex): Complex; - acos(x: MathArray): MathArray; - acos(x: Matrix): Matrix; + acos(x: number): number + acos(x: BigNumber): BigNumber + acos(x: Complex): Complex + acos(x: MathArray): MathArray + acos(x: Matrix): Matrix /** * Calculate the hyperbolic arccos of a value, defined as acosh(x) = @@ -2415,11 +2689,11 @@ declare namespace math { * @param x Function input * @returns The hyperbolic arccosine of x */ - acosh(x: number): number; - acosh(x: BigNumber): BigNumber; - acosh(x: Complex): Complex; - acosh(x: MathArray): MathArray; - acosh(x: Matrix): Matrix; + acosh(x: number): number + acosh(x: BigNumber): BigNumber + acosh(x: Complex): Complex + acosh(x: MathArray): MathArray + acosh(x: Matrix): Matrix /** * Calculate the inverse cotangent of a value. For matrices, the @@ -2427,10 +2701,10 @@ declare namespace math { * @param x Function input * @returns The arc cotangent of x */ - acot(x: number): number; - acot(x: BigNumber): BigNumber; - acot(x: MathArray): MathArray; - acot(x: Matrix): Matrix; + acot(x: number): number + acot(x: BigNumber): BigNumber + acot(x: MathArray): MathArray + acot(x: Matrix): Matrix /** * Calculate the hyperbolic arccotangent of a value, defined as acoth(x) @@ -2439,10 +2713,10 @@ declare namespace math { * @param x Function input * @returns The hyperbolic arccotangent of x */ - acoth(x: number): number; - acoth(x: BigNumber): BigNumber; - acoth(x: MathArray): MathArray; - acoth(x: Matrix): Matrix; + acoth(x: number): number + acoth(x: BigNumber): BigNumber + acoth(x: MathArray): MathArray + acoth(x: Matrix): Matrix /** * Calculate the inverse cosecant of a value. For matrices, the function @@ -2450,10 +2724,10 @@ declare namespace math { * @param x Function input * @returns The arc cosecant of x */ - acsc(x: number): number; - acsc(x: BigNumber): BigNumber; - acsc(x: MathArray): MathArray; - acsc(x: Matrix): Matrix; + acsc(x: number): number + acsc(x: BigNumber): BigNumber + acsc(x: MathArray): MathArray + acsc(x: Matrix): Matrix /** * Calculate the hyperbolic arccosecant of a value, defined as acsch(x) @@ -2462,10 +2736,10 @@ declare namespace math { * @param x Function input * @returns The hyperbolic arccosecant of x */ - acsch(x: number): number; - acsch(x: BigNumber): BigNumber; - acsch(x: MathArray): MathArray; - acsch(x: Matrix): Matrix; + acsch(x: number): number + acsch(x: BigNumber): BigNumber + acsch(x: MathArray): MathArray + acsch(x: Matrix): Matrix /** * Calculate the inverse secant of a value. For matrices, the function @@ -2473,10 +2747,10 @@ declare namespace math { * @param x Function input * @returns The arc secant of x */ - asec(x: number): number; - asec(x: BigNumber): BigNumber; - asec(x: MathArray): MathArray; - asec(x: Matrix): Matrix; + asec(x: number): number + asec(x: BigNumber): BigNumber + asec(x: MathArray): MathArray + asec(x: Matrix): Matrix /** * Calculate the hyperbolic arcsecant of a value, defined as asech(x) = @@ -2485,10 +2759,10 @@ declare namespace math { * @param x Function input * @returns The hyperbolic arcsecant of x */ - asech(x: number): number; - asech(x: BigNumber): BigNumber; - asech(x: MathArray): MathArray; - asech(x: Matrix): Matrix; + asech(x: number): number + asech(x: BigNumber): BigNumber + asech(x: MathArray): MathArray + asech(x: Matrix): Matrix /** * Calculate the inverse sine of a value. For matrices, the function is @@ -2496,11 +2770,11 @@ declare namespace math { * @param x Function input * @returns The arc sine of x */ - asin(x: number): number; - asin(x: BigNumber): BigNumber; - asin(x: Complex): Complex; - asin(x: MathArray): MathArray; - asin(x: Matrix): Matrix; + asin(x: number): number + asin(x: BigNumber): BigNumber + asin(x: Complex): Complex + asin(x: MathArray): MathArray + asin(x: Matrix): Matrix /** * Calculate the hyperbolic arcsine of a value, defined as asinh(x) = @@ -2509,10 +2783,10 @@ declare namespace math { * @param x Function input * @returns The hyperbolic arcsine of x */ - asinh(x: number): number; - asinh(x: BigNumber): BigNumber; - asinh(x: MathArray): MathArray; - asinh(x: Matrix): Matrix; + asinh(x: number): number + asinh(x: BigNumber): BigNumber + asinh(x: MathArray): MathArray + asinh(x: Matrix): Matrix /** * Calculate the inverse tangent of a value. For matrices, the function @@ -2520,10 +2794,10 @@ declare namespace math { * @param x Function input * @returns The arc tangent of x */ - atan(x: number): number; - atan(x: BigNumber): BigNumber; - atan(x: MathArray): MathArray; - atan(x: Matrix): Matrix; + atan(x: number): number + atan(x: BigNumber): BigNumber + atan(x: MathArray): MathArray + atan(x: Matrix): Matrix /** * Calculate the inverse tangent function with two arguments, y/x. By @@ -2532,8 +2806,8 @@ declare namespace math { * @param x Function input * @returns Four quadrant inverse tangent */ - atan2(y: number, x: number): number; - atan2(y: MathCollection, x: MathCollection): MathCollection; + atan2(y: number, x: number): number + atan2(y: MathCollection, x: MathCollection): MathCollection /** * Calculate the hyperbolic arctangent of a value, defined as atanh(x) = @@ -2542,10 +2816,10 @@ declare namespace math { * @param x Function input * @returns The hyperbolic arctangent of x */ - atanh(x: number): number; - atanh(x: BigNumber): BigNumber; - atanh(x: MathArray): MathArray; - atanh(x: Matrix): Matrix; + atanh(x: number): number + atanh(x: BigNumber): BigNumber + atanh(x: MathArray): MathArray + atanh(x: Matrix): Matrix /** * Calculate the cosine of a value. For matrices, the function is @@ -2553,11 +2827,11 @@ declare namespace math { * @param x Function input * @returns The cosine of x */ - cos(x: number | Unit): number; - cos(x: BigNumber): BigNumber; - cos(x: Complex): Complex; - cos(x: MathArray): MathArray; - cos(x: Matrix): Matrix; + cos(x: number | Unit): number + cos(x: BigNumber): BigNumber + cos(x: Complex): Complex + cos(x: MathArray): MathArray + cos(x: Matrix): Matrix /** * Calculate the hyperbolic cosine of a value, defined as cosh(x) = 1/2 @@ -2566,11 +2840,11 @@ declare namespace math { * @param x Function input * @returns The hyperbolic cosine of x */ - cosh(x: number | Unit): number; - cosh(x: BigNumber): BigNumber; - cosh(x: Complex): Complex; - cosh(x: MathArray): MathArray; - cosh(x: Matrix): Matrix; + cosh(x: number | Unit): number + cosh(x: BigNumber): BigNumber + cosh(x: Complex): Complex + cosh(x: MathArray): MathArray + cosh(x: Matrix): Matrix /** * Calculate the cotangent of a value. cot(x) is defined as 1 / tan(x). @@ -2578,10 +2852,10 @@ declare namespace math { * @param x Function input * @returns The cotangent of x */ - cot(x: number | Unit): number; - cot(x: Complex): Complex; - cot(x: MathArray): MathArray; - cot(x: Matrix): Matrix; + cot(x: number | Unit): number + cot(x: Complex): Complex + cot(x: MathArray): MathArray + cot(x: Matrix): Matrix /** * Calculate the hyperbolic cotangent of a value, defined as coth(x) = 1 @@ -2589,10 +2863,10 @@ declare namespace math { * @param x Function input * @returns The hyperbolic cotangent of x */ - coth(x: number | Unit): number; - coth(x: Complex): Complex; - coth(x: MathArray): MathArray; - coth(x: Matrix): Matrix; + coth(x: number | Unit): number + coth(x: Complex): Complex + coth(x: MathArray): MathArray + coth(x: Matrix): Matrix /** * Calculate the cosecant of a value, defined as csc(x) = 1/sin(x). For @@ -2600,10 +2874,10 @@ declare namespace math { * @param x Function input * @returns The cosecant hof x */ - csc(x: number | Unit): number; - csc(x: Complex): Complex; - csc(x: MathArray): MathArray; - csc(x: Matrix): Matrix; + csc(x: number | Unit): number + csc(x: Complex): Complex + csc(x: MathArray): MathArray + csc(x: Matrix): Matrix /** * Calculate the hyperbolic cosecant of a value, defined as csch(x) = 1 @@ -2611,10 +2885,10 @@ declare namespace math { * @param x Function input * @returns The hyperbolic cosecant of x */ - csch(x: number | Unit): number; - csch(x: Complex): Complex; - csch(x: MathArray): MathArray; - csch(x: Matrix): Matrix; + csch(x: number | Unit): number + csch(x: Complex): Complex + csch(x: MathArray): MathArray + csch(x: Matrix): Matrix /** * Calculate the secant of a value, defined as sec(x) = 1/cos(x). For @@ -2622,10 +2896,10 @@ declare namespace math { * @param x Function input * @returns The secant of x */ - sec(x: number | Unit): number; - sec(x: Complex): Complex; - sec(x: MathArray): MathArray; - sec(x: Matrix): Matrix; + sec(x: number | Unit): number + sec(x: Complex): Complex + sec(x: MathArray): MathArray + sec(x: Matrix): Matrix /** * Calculate the hyperbolic secant of a value, defined as sech(x) = 1 / @@ -2633,10 +2907,10 @@ declare namespace math { * @param x Function input * @returns The hyperbolic secant of x */ - sech(x: number | Unit): number; - sech(x: Complex): Complex; - sech(x: MathArray): MathArray; - sech(x: Matrix): Matrix; + sech(x: number | Unit): number + sech(x: Complex): Complex + sech(x: MathArray): MathArray + sech(x: Matrix): Matrix /** * Calculate the sine of a value. For matrices, the function is @@ -2644,11 +2918,11 @@ declare namespace math { * @param x Function input * @returns The sine of x */ - sin(x: number | Unit): number; - sin(x: BigNumber): BigNumber; - sin(x: Complex): Complex; - sin(x: MathArray): MathArray; - sin(x: Matrix): Matrix; + sin(x: number | Unit): number + sin(x: BigNumber): BigNumber + sin(x: Complex): Complex + sin(x: MathArray): MathArray + sin(x: Matrix): Matrix /** * Calculate the hyperbolic sine of a value, defined as sinh(x) = 1/2 * @@ -2657,11 +2931,11 @@ declare namespace math { * @param x Function input * @returns The hyperbolic sine of x */ - sinh(x: number | Unit): number; - sinh(x: BigNumber): BigNumber; - sinh(x: Complex): Complex; - sinh(x: MathArray): MathArray; - sinh(x: Matrix): Matrix; + sinh(x: number | Unit): number + sinh(x: BigNumber): BigNumber + sinh(x: Complex): Complex + sinh(x: MathArray): MathArray + sinh(x: Matrix): Matrix /** * Calculate the tangent of a value. tan(x) is equal to sin(x) / cos(x). @@ -2669,11 +2943,11 @@ declare namespace math { * @param x Function input * @returns The tangent of x */ - tan(x: number | Unit): number; - tan(x: BigNumber): BigNumber; - tan(x: Complex): Complex; - tan(x: MathArray): MathArray; - tan(x: Matrix): Matrix; + tan(x: number | Unit): number + tan(x: BigNumber): BigNumber + tan(x: Complex): Complex + tan(x: MathArray): MathArray + tan(x: Matrix): Matrix /** * Calculate the hyperbolic tangent of a value, defined as tanh(x) = @@ -2682,11 +2956,11 @@ declare namespace math { * @param x Function input * @returns The hyperbolic tangent of x */ - tanh(x: number | Unit): number; - tanh(x: BigNumber): BigNumber; - tanh(x: Complex): Complex; - tanh(x: MathArray): MathArray; - tanh(x: Matrix): Matrix; + tanh(x: number | Unit): number + tanh(x: BigNumber): BigNumber + tanh(x: Complex): Complex + tanh(x: MathArray): MathArray + tanh(x: Matrix): Matrix /************************************************************************* * Unit functions @@ -2700,86 +2974,87 @@ declare namespace math { * value. * @returns Value with changed, fixed unit */ - to(x: Unit | MathCollection, unit: Unit | string): Unit | MathCollection; + to(x: Unit | MathCollection, unit: Unit | string): Unit | MathCollection /************************************************************************* * Utils ************************************************************************/ - isNumber(x: unknown): x is number; + isNumber(x: unknown): x is number - isBigNumber(x: unknown): x is BigNumber; + isBigNumber(x: unknown): x is BigNumber - isComplex(x: unknown): x is Complex; + isComplex(x: unknown): x is Complex - isFraction(x: unknown): x is Fraction; + isFraction(x: unknown): x is Fraction - isUnit(x: unknown): x is Unit; + isUnit(x: unknown): x is Unit - isString(x: unknown): x is string; + isString(x: unknown): x is string - isArray: ArrayConstructor['isArray']; + isArray: ArrayConstructor['isArray'] - isMatrix(x: unknown): x is Matrix; + isMatrix(x: unknown): x is Matrix - isCollection(x: unknown): x is (Matrix | any[]); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + isCollection(x: unknown): x is Matrix | any[] - isDenseMatrix(x: unknown): x is Matrix; + isDenseMatrix(x: unknown): x is Matrix - isSparseMatrix(x: unknown): x is Matrix; + isSparseMatrix(x: unknown): x is Matrix - isRange(x: unknown): boolean; + isRange(x: unknown): boolean - isIndex(x: unknown): x is Index; + isIndex(x: unknown): x is Index - isBoolean(x: unknown): x is boolean; + isBoolean(x: unknown): x is boolean - isResultSet(x: unknown): boolean; + isResultSet(x: unknown): boolean - isHelp(x: unknown): x is Help; + isHelp(x: unknown): x is Help - isFunction(x: unknown): boolean; + isFunction(x: unknown): boolean - isDate(x: unknown): x is Date; + isDate(x: unknown): x is Date - isRegExp(x: unknown): x is RegExp; + isRegExp(x: unknown): x is RegExp - isObject(x: unknown): boolean; + isObject(x: unknown): boolean - isNull(x: unknown): x is null; + isNull(x: unknown): x is null - isUndefined(x: unknown): x is undefined; + isUndefined(x: unknown): x is undefined - isAccessorNode(x: unknown): x is AccessorNode; + isAccessorNode(x: unknown): x is AccessorNode - isArrayNode(x: unknown): x is ArrayNode; + isArrayNode(x: unknown): x is ArrayNode - isAssignmentNode(x: unknown): x is AssignmentNode; + isAssignmentNode(x: unknown): x is AssignmentNode - isBlockNode(x: unknown): x is BlockNode; + isBlockNode(x: unknown): x is BlockNode - isConditionalNode(x: unknown): x is ConditionalNode; + isConditionalNode(x: unknown): x is ConditionalNode - isConstantNode(x: unknown): x is ConstantNode; + isConstantNode(x: unknown): x is ConstantNode - isFunctionAssignmentNode(x: unknown): x is FunctionAssignmentNode; + isFunctionAssignmentNode(x: unknown): x is FunctionAssignmentNode - isFunctionNode(x: unknown): x is FunctionNode; + isFunctionNode(x: unknown): x is FunctionNode - isIndexNode(x: unknown): x is IndexNode; + isIndexNode(x: unknown): x is IndexNode - isNode(x: unknown): x is MathNodeCommon; + isNode(x: unknown): x is MathNodeCommon - isObjectNode(x: unknown): x is ObjectNode; + isObjectNode(x: unknown): x is ObjectNode - isOperatorNode(x: unknown): x is OperatorNode; + isOperatorNode(x: unknown): x is OperatorNode - isParenthesisNode(x: unknown): x is ParenthesisNode; + isParenthesisNode(x: unknown): x is ParenthesisNode - isRangeNode(x: unknown): x is RangeNode; + isRangeNode(x: unknown): x is RangeNode - isSymbolNode(x: unknown): x is SymbolNode; + isSymbolNode(x: unknown): x is SymbolNode - isChain(x: unknown): x is MathJsChain; + isChain(x: unknown): x is MathJsChain /************************************************************************* * Functions -> Utils @@ -2790,7 +3065,8 @@ declare namespace math { * @param x Object to be cloned * @returns A clone of object x */ - clone(x: any): any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + clone(x: any): any /** * Test whether a value is an numeric value. In case of a string, @@ -2800,7 +3076,8 @@ declare namespace math { * Returns false for other types. * Throws an error in case of unknown types. */ - hasNumericValue(x: any ): boolean| boolean[]; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + hasNumericValue(x: any): boolean | boolean[] /** * Test whether a value is an integer number. The function supports @@ -2810,7 +3087,7 @@ declare namespace math { * @returns Returns true when x contains a numeric, integer value. * Throws an error in case of an unknown data type. */ - isInteger(x: number | BigNumber | Fraction | MathCollection): boolean; + isInteger(x: number | BigNumber | Fraction | MathCollection): boolean /** * Test whether a value is NaN (not a number). The function supports @@ -2820,7 +3097,7 @@ declare namespace math { * @returns Returns true when x is NaN. Throws an error in case of an * unknown data type. */ - isNaN(x: number | BigNumber | Fraction | MathCollection | Unit): boolean; + isNaN(x: number | BigNumber | Fraction | MathCollection | Unit): boolean /** * Test whether a value is negative: smaller than zero. The function @@ -2830,7 +3107,9 @@ declare namespace math { * @returns Returns true when x is larger than zero. Throws an error in * case of an unknown data type. */ - isNegative(x: number | BigNumber | Fraction | MathCollection | Unit): boolean; + isNegative( + x: number | BigNumber | Fraction | MathCollection | Unit + ): boolean /** * Test whether a value is an numeric value. The function is evaluated @@ -2840,7 +3119,8 @@ declare namespace math { * boolean. Returns false for other types. Throws an error in case of * unknown types. */ - isNumeric(x: any): x is number | BigNumber | Fraction | boolean; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + isNumeric(x: any): x is number | BigNumber | Fraction | boolean /** * Test whether a value is positive: larger than zero. The function @@ -2850,7 +3130,9 @@ declare namespace math { * @returns Returns true when x is larger than zero. Throws an error in * case of an unknown data type. */ - isPositive(x: number | BigNumber | Fraction | MathCollection | Unit): boolean; + isPositive( + x: number | BigNumber | Fraction | MathCollection | Unit + ): boolean /** * Test whether a value is prime: has no divisors other than itself and @@ -2860,7 +3142,7 @@ declare namespace math { * @returns Returns true when x is larger than zero. Throws an error in * case of an unknown data type. */ - isPrime(x: number | BigNumber | MathCollection): boolean; + isPrime(x: number | BigNumber | MathCollection): boolean /** * Test whether a value is zero. The function can check for zero for @@ -2870,7 +3152,9 @@ declare namespace math { * @returns Returns true when x is zero. Throws an error in case of an * unknown data type. */ - isZero(x: number | BigNumber | Fraction | MathCollection | Unit | Complex): boolean; + isZero( + x: number | BigNumber | Fraction | MathCollection | Unit | Complex + ): boolean /** * Determine the type of a variable. @@ -2879,7 +3163,8 @@ declare namespace math { * case, non-primitive types are upper-camel-case. For example ‘number’, * ‘string’, ‘Array’, ‘Date’. */ - typeOf(x: any): string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + typeOf(x: any): string /** * Import functions from an object or a module @@ -2896,541 +3181,583 @@ declare namespace math { * @param object An object with functions to be imported. * @param options An object with import options. */ - import(object: ImportObject | ImportObject[], options: ImportOptions): void; + import(object: ImportObject | ImportObject[], options: ImportOptions): void } /************************************************************************* * Factory and Dependencies ************************************************************************/ interface FactoryDependencies { - create: (factories: FactoryFunctionMap, config?: ConfigOptions) => MathJsStatic; + create: ( + factories: FactoryFunctionMap, + config?: ConfigOptions + ) => MathJsStatic factory: ( - name: string, - dependencies: MathJsFunctionName[], - create: (injected: Partial) => T, - meta?: any - ) => FactoryFunction; - all: FactoryFunctionMap; + name: string, + dependencies: MathJsFunctionName[], + create: (injected: Partial) => T, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + meta?: any + ) => FactoryFunction + all: FactoryFunctionMap - typedDependencies: FactoryFunctionMap; - ResultSetDependencies: FactoryFunctionMap; - BigNumberDependencies: FactoryFunctionMap; - ComplexDependencies: FactoryFunctionMap; - FractionDependencies: FactoryFunctionMap; - RangeDependencies: FactoryFunctionMap; - MatrixDependencies: FactoryFunctionMap; - DenseMatrixDependencies: FactoryFunctionMap; - cloneDependencies: FactoryFunctionMap; - isIntegerDependencies: FactoryFunctionMap; - isNegativeDependencies: FactoryFunctionMap; - isNumericDependencies: FactoryFunctionMap; - hasNumericValueDependencies: FactoryFunctionMap; - isPositiveDependencies: FactoryFunctionMap; - isZeroDependencies: FactoryFunctionMap; - isNaNDependencies: FactoryFunctionMap; - typeOfDependencies: FactoryFunctionMap; - typeofDependencies: FactoryFunctionMap; - equalScalarDependencies: FactoryFunctionMap; - SparseMatrixDependencies: FactoryFunctionMap; - numberDependencies: FactoryFunctionMap; - stringDependencies: FactoryFunctionMap; - booleanDependencies: FactoryFunctionMap; - bignumberDependencies: FactoryFunctionMap; - complexDependencies: FactoryFunctionMap; - fractionDependencies: FactoryFunctionMap; - matrixDependencies: FactoryFunctionMap; - splitUnitDependencies: FactoryFunctionMap; - unaryMinusDependencies: FactoryFunctionMap; - unaryPlusDependencies: FactoryFunctionMap; - absDependencies: FactoryFunctionMap; - applyDependencies: FactoryFunctionMap; - addScalarDependencies: FactoryFunctionMap; - cbrtDependencies: FactoryFunctionMap; - ceilDependencies: FactoryFunctionMap; - cubeDependencies: FactoryFunctionMap; - expDependencies: FactoryFunctionMap; - expm1Dependencies: FactoryFunctionMap; - fixDependencies: FactoryFunctionMap; - floorDependencies: FactoryFunctionMap; - gcdDependencies: FactoryFunctionMap; - lcmDependencies: FactoryFunctionMap; - log10Dependencies: FactoryFunctionMap; - log2Dependencies: FactoryFunctionMap; - modDependencies: FactoryFunctionMap; - multiplyScalarDependencies: FactoryFunctionMap; - multiplyDependencies: FactoryFunctionMap; - nthRootDependencies: FactoryFunctionMap; - signDependencies: FactoryFunctionMap; - sqrtDependencies: FactoryFunctionMap; - squareDependencies: FactoryFunctionMap; - subtractDependencies: FactoryFunctionMap; - xgcdDependencies: FactoryFunctionMap; - dotMultiplyDependencies: FactoryFunctionMap; - bitAndDependencies: FactoryFunctionMap; - bitNotDependencies: FactoryFunctionMap; - bitOrDependencies: FactoryFunctionMap; - bitXorDependencies: FactoryFunctionMap; - argDependencies: FactoryFunctionMap; - conjDependencies: FactoryFunctionMap; - imDependencies: FactoryFunctionMap; - reDependencies: FactoryFunctionMap; - notDependencies: FactoryFunctionMap; - orDependencies: FactoryFunctionMap; - xorDependencies: FactoryFunctionMap; - concatDependencies: FactoryFunctionMap; - columnDependencies: FactoryFunctionMap; - crossDependencies: FactoryFunctionMap; - diagDependencies: FactoryFunctionMap; - eyeDependencies: FactoryFunctionMap; - filterDependencies: FactoryFunctionMap; - flattenDependencies: FactoryFunctionMap; - forEachDependencies: FactoryFunctionMap; - getMatrixDataTypeDependencies: FactoryFunctionMap; - identityDependencies: FactoryFunctionMap; - kronDependencies: FactoryFunctionMap; - mapDependencies: FactoryFunctionMap; - onesDependencies: FactoryFunctionMap; - rangeDependencies: FactoryFunctionMap; - reshapeDependencies: FactoryFunctionMap; - resizeDependencies: FactoryFunctionMap; - rowDependencies: FactoryFunctionMap; - sizeDependencies: FactoryFunctionMap; - squeezeDependencies: FactoryFunctionMap; - subsetDependencies: FactoryFunctionMap; - transposeDependencies: FactoryFunctionMap; - ctransposeDependencies: FactoryFunctionMap; - zerosDependencies: FactoryFunctionMap; - erfDependencies: FactoryFunctionMap; - modeDependencies: FactoryFunctionMap; - prodDependencies: FactoryFunctionMap; - formatDependencies: FactoryFunctionMap; - printDependencies: FactoryFunctionMap; - toDependencies: FactoryFunctionMap; - isPrimeDependencies: FactoryFunctionMap; - numericDependencies: FactoryFunctionMap; - divideScalarDependencies: FactoryFunctionMap; - powDependencies: FactoryFunctionMap; - roundDependencies: FactoryFunctionMap; - logDependencies: FactoryFunctionMap; - log1pDependencies: FactoryFunctionMap; - nthRootsDependencies: FactoryFunctionMap; - dotPowDependencies: FactoryFunctionMap; - dotDivideDependencies: FactoryFunctionMap; - lsolveDependencies: FactoryFunctionMap; - usolveDependencies: FactoryFunctionMap; - leftShiftDependencies: FactoryFunctionMap; - rightArithShiftDependencies: FactoryFunctionMap; - rightLogShiftDependencies: FactoryFunctionMap; - andDependencies: FactoryFunctionMap; - compareDependencies: FactoryFunctionMap; - compareNaturalDependencies: FactoryFunctionMap; - compareTextDependencies: FactoryFunctionMap; - equalDependencies: FactoryFunctionMap; - equalTextDependencies: FactoryFunctionMap; - smallerDependencies: FactoryFunctionMap; - smallerEqDependencies: FactoryFunctionMap; - largerDependencies: FactoryFunctionMap; - largerEqDependencies: FactoryFunctionMap; - deepEqualDependencies: FactoryFunctionMap; - unequalDependencies: FactoryFunctionMap; - partitionSelectDependencies: FactoryFunctionMap; - sortDependencies: FactoryFunctionMap; - maxDependencies: FactoryFunctionMap; - minDependencies: FactoryFunctionMap; - ImmutableDenseMatrixDependencies: FactoryFunctionMap; - IndexDependencies: FactoryFunctionMap; - FibonacciHeapDependencies: FactoryFunctionMap; - SpaDependencies: FactoryFunctionMap; - UnitDependencies: FactoryFunctionMap; - unitDependencies: FactoryFunctionMap; - sparseDependencies: FactoryFunctionMap; - createUnitDependencies: FactoryFunctionMap; - acosDependencies: FactoryFunctionMap; - acoshDependencies: FactoryFunctionMap; - acotDependencies: FactoryFunctionMap; - acothDependencies: FactoryFunctionMap; - acscDependencies: FactoryFunctionMap; - acschDependencies: FactoryFunctionMap; - asecDependencies: FactoryFunctionMap; - asechDependencies: FactoryFunctionMap; - asinDependencies: FactoryFunctionMap; - asinhDependencies: FactoryFunctionMap; - atanDependencies: FactoryFunctionMap; - atan2Dependencies: FactoryFunctionMap; - atanhDependencies: FactoryFunctionMap; - cosDependencies: FactoryFunctionMap; - coshDependencies: FactoryFunctionMap; - cotDependencies: FactoryFunctionMap; - cothDependencies: FactoryFunctionMap; - cscDependencies: FactoryFunctionMap; - cschDependencies: FactoryFunctionMap; - secDependencies: FactoryFunctionMap; - sechDependencies: FactoryFunctionMap; - sinDependencies: FactoryFunctionMap; - sinhDependencies: FactoryFunctionMap; - tanDependencies: FactoryFunctionMap; - tanhDependencies: FactoryFunctionMap; - setCartesianDependencies: FactoryFunctionMap; - setDifferenceDependencies: FactoryFunctionMap; - setDistinctDependencies: FactoryFunctionMap; - setIntersectDependencies: FactoryFunctionMap; - setIsSubsetDependencies: FactoryFunctionMap; - setMultiplicityDependencies: FactoryFunctionMap; - setPowersetDependencies: FactoryFunctionMap; - setSizeDependencies: FactoryFunctionMap; - setSymDifferenceDependencies: FactoryFunctionMap; - setUnionDependencies: FactoryFunctionMap; - addDependencies: FactoryFunctionMap; - hypotDependencies: FactoryFunctionMap; - normDependencies: FactoryFunctionMap; - dotDependencies: FactoryFunctionMap; - traceDependencies: FactoryFunctionMap; - indexDependencies: FactoryFunctionMap; - NodeDependencies: FactoryFunctionMap; - AccessorNodeDependencies: FactoryFunctionMap; - ArrayNodeDependencies: FactoryFunctionMap; - AssignmentNodeDependencies: FactoryFunctionMap; - BlockNodeDependencies: FactoryFunctionMap; - ConditionalNodeDependencies: FactoryFunctionMap; - ConstantNodeDependencies: FactoryFunctionMap; - FunctionAssignmentNodeDependencies: FactoryFunctionMap; - IndexNodeDependencies: FactoryFunctionMap; - ObjectNodeDependencies: FactoryFunctionMap; - OperatorNodeDependencies: FactoryFunctionMap; - ParenthesisNodeDependencies: FactoryFunctionMap; - RangeNodeDependencies: FactoryFunctionMap; - RelationalNodeDependencies: FactoryFunctionMap; - SymbolNodeDependencies: FactoryFunctionMap; - FunctionNodeDependencies: FactoryFunctionMap; - parseDependencies: FactoryFunctionMap; - compileDependencies: FactoryFunctionMap; - evaluateDependencies: FactoryFunctionMap; - evalDependencies: FactoryFunctionMap; - ParserDependencies: FactoryFunctionMap; - parserDependencies: FactoryFunctionMap; - lupDependencies: FactoryFunctionMap; - qrDependencies: FactoryFunctionMap; - sluDependencies: FactoryFunctionMap; - lusolveDependencies: FactoryFunctionMap; - HelpDependencies: FactoryFunctionMap; - ChainDependencies: FactoryFunctionMap; - helpDependencies: FactoryFunctionMap; - chainDependencies: FactoryFunctionMap; - detDependencies: FactoryFunctionMap; - invDependencies: FactoryFunctionMap; - expmDependencies: FactoryFunctionMap; - sqrtmDependencies: FactoryFunctionMap; - divideDependencies: FactoryFunctionMap; - distanceDependencies: FactoryFunctionMap; - intersectDependencies: FactoryFunctionMap; - sumDependencies: FactoryFunctionMap; - meanDependencies: FactoryFunctionMap; - medianDependencies: FactoryFunctionMap; - madDependencies: FactoryFunctionMap; - varianceDependencies: FactoryFunctionMap; - varDependencies: FactoryFunctionMap; - quantileSeqDependencies: FactoryFunctionMap; - stdDependencies: FactoryFunctionMap; - combinationsDependencies: FactoryFunctionMap; - gammaDependencies: FactoryFunctionMap; - factorialDependencies: FactoryFunctionMap; - kldivergenceDependencies: FactoryFunctionMap; - multinomialDependencies: FactoryFunctionMap; - permutationsDependencies: FactoryFunctionMap; - pickRandomDependencies: FactoryFunctionMap; - randomDependencies: FactoryFunctionMap; - randomIntDependencies: FactoryFunctionMap; - stirlingS2Dependencies: FactoryFunctionMap; - bellNumbersDependencies: FactoryFunctionMap; - catalanDependencies: FactoryFunctionMap; - compositionDependencies: FactoryFunctionMap; - simplifyDependencies: FactoryFunctionMap; - derivativeDependencies: FactoryFunctionMap; - rationalizeDependencies: FactoryFunctionMap; - reviverDependencies: FactoryFunctionMap; - eDependencies: FactoryFunctionMap; - EDependencies: FactoryFunctionMap; - falseDependencies: FactoryFunctionMap; - iDependencies: FactoryFunctionMap; - InfinityDependencies: FactoryFunctionMap; - LN10Dependencies: FactoryFunctionMap; - LN2Dependencies: FactoryFunctionMap; - LOG10EDependencies: FactoryFunctionMap; - LOG2EDependencies: FactoryFunctionMap; - NaNDependencies: FactoryFunctionMap; - nullDependencies: FactoryFunctionMap; - phiDependencies: FactoryFunctionMap; - piDependencies: FactoryFunctionMap; - PIDependencies: FactoryFunctionMap; - SQRT1_2Dependencies: FactoryFunctionMap; - SQRT2Dependencies: FactoryFunctionMap; - tauDependencies: FactoryFunctionMap; - trueDependencies: FactoryFunctionMap; - versionDependencies: FactoryFunctionMap; - atomicMassDependencies: FactoryFunctionMap; - avogadroDependencies: FactoryFunctionMap; - bohrMagnetonDependencies: FactoryFunctionMap; - bohrRadiusDependencies: FactoryFunctionMap; - boltzmannDependencies: FactoryFunctionMap; - classicalElectronRadiusDependencies: FactoryFunctionMap; - conductanceQuantumDependencies: FactoryFunctionMap; - coulombDependencies: FactoryFunctionMap; - deuteronMassDependencies: FactoryFunctionMap; - efimovFactorDependencies: FactoryFunctionMap; - electricConstantDependencies: FactoryFunctionMap; - electronMassDependencies: FactoryFunctionMap; - elementaryChargeDependencies: FactoryFunctionMap; - faradayDependencies: FactoryFunctionMap; - fermiCouplingDependencies: FactoryFunctionMap; - fineStructureDependencies: FactoryFunctionMap; - firstRadiationDependencies: FactoryFunctionMap; - gasConstantDependencies: FactoryFunctionMap; - gravitationConstantDependencies: FactoryFunctionMap; - gravityDependencies: FactoryFunctionMap; - hartreeEnergyDependencies: FactoryFunctionMap; - inverseConductanceQuantumDependencies: FactoryFunctionMap; - klitzingDependencies: FactoryFunctionMap; - loschmidtDependencies: FactoryFunctionMap; - magneticConstantDependencies: FactoryFunctionMap; - magneticFluxQuantumDependencies: FactoryFunctionMap; - molarMassDependencies: FactoryFunctionMap; - molarMassC12Dependencies: FactoryFunctionMap; - molarPlanckConstantDependencies: FactoryFunctionMap; - molarVolumeDependencies: FactoryFunctionMap; - neutronMassDependencies: FactoryFunctionMap; - nuclearMagnetonDependencies: FactoryFunctionMap; - planckChargeDependencies: FactoryFunctionMap; - planckConstantDependencies: FactoryFunctionMap; - planckLengthDependencies: FactoryFunctionMap; - planckMassDependencies: FactoryFunctionMap; - planckTemperatureDependencies: FactoryFunctionMap; - planckTimeDependencies: FactoryFunctionMap; - protonMassDependencies: FactoryFunctionMap; - quantumOfCirculationDependencies: FactoryFunctionMap; - reducedPlanckConstantDependencies: FactoryFunctionMap; - rydbergDependencies: FactoryFunctionMap; - sackurTetrodeDependencies: FactoryFunctionMap; - secondRadiationDependencies: FactoryFunctionMap; - speedOfLightDependencies: FactoryFunctionMap; - stefanBoltzmannDependencies: FactoryFunctionMap; - thomsonCrossSectionDependencies: FactoryFunctionMap; - vacuumImpedanceDependencies: FactoryFunctionMap; - weakMixingAngleDependencies: FactoryFunctionMap; - wienDisplacementDependencies: FactoryFunctionMap; - applyTransformDependencies: FactoryFunctionMap; - columnTransformDependencies: FactoryFunctionMap; - filterTransformDependencies: FactoryFunctionMap; - forEachTransformDependencies: FactoryFunctionMap; - indexTransformDependencies: FactoryFunctionMap; - mapTransformDependencies: FactoryFunctionMap; - maxTransformDependencies: FactoryFunctionMap; - meanTransformDependencies: FactoryFunctionMap; - minTransformDependencies: FactoryFunctionMap; - rangeTransformDependencies: FactoryFunctionMap; - rowTransformDependencies: FactoryFunctionMap; - subsetTransformDependencies: FactoryFunctionMap; - concatTransformDependencies: FactoryFunctionMap; - stdTransformDependencies: FactoryFunctionMap; - sumTransformDependencies: FactoryFunctionMap; - varianceTransformDependencies: FactoryFunctionMap; + typedDependencies: FactoryFunctionMap + ResultSetDependencies: FactoryFunctionMap + BigNumberDependencies: FactoryFunctionMap + ComplexDependencies: FactoryFunctionMap + FractionDependencies: FactoryFunctionMap + RangeDependencies: FactoryFunctionMap + MatrixDependencies: FactoryFunctionMap + DenseMatrixDependencies: FactoryFunctionMap + cloneDependencies: FactoryFunctionMap + isIntegerDependencies: FactoryFunctionMap + isNegativeDependencies: FactoryFunctionMap + isNumericDependencies: FactoryFunctionMap + hasNumericValueDependencies: FactoryFunctionMap + isPositiveDependencies: FactoryFunctionMap + isZeroDependencies: FactoryFunctionMap + isNaNDependencies: FactoryFunctionMap + typeOfDependencies: FactoryFunctionMap + typeofDependencies: FactoryFunctionMap + equalScalarDependencies: FactoryFunctionMap + SparseMatrixDependencies: FactoryFunctionMap + numberDependencies: FactoryFunctionMap + stringDependencies: FactoryFunctionMap + booleanDependencies: FactoryFunctionMap + bignumberDependencies: FactoryFunctionMap + complexDependencies: FactoryFunctionMap + fractionDependencies: FactoryFunctionMap + matrixDependencies: FactoryFunctionMap + splitUnitDependencies: FactoryFunctionMap + unaryMinusDependencies: FactoryFunctionMap + unaryPlusDependencies: FactoryFunctionMap + absDependencies: FactoryFunctionMap + applyDependencies: FactoryFunctionMap + addScalarDependencies: FactoryFunctionMap + cbrtDependencies: FactoryFunctionMap + ceilDependencies: FactoryFunctionMap + cubeDependencies: FactoryFunctionMap + expDependencies: FactoryFunctionMap + expm1Dependencies: FactoryFunctionMap + fixDependencies: FactoryFunctionMap + floorDependencies: FactoryFunctionMap + gcdDependencies: FactoryFunctionMap + lcmDependencies: FactoryFunctionMap + log10Dependencies: FactoryFunctionMap + log2Dependencies: FactoryFunctionMap + modDependencies: FactoryFunctionMap + multiplyScalarDependencies: FactoryFunctionMap + multiplyDependencies: FactoryFunctionMap + nthRootDependencies: FactoryFunctionMap + signDependencies: FactoryFunctionMap + sqrtDependencies: FactoryFunctionMap + squareDependencies: FactoryFunctionMap + subtractDependencies: FactoryFunctionMap + xgcdDependencies: FactoryFunctionMap + dotMultiplyDependencies: FactoryFunctionMap + bitAndDependencies: FactoryFunctionMap + bitNotDependencies: FactoryFunctionMap + bitOrDependencies: FactoryFunctionMap + bitXorDependencies: FactoryFunctionMap + argDependencies: FactoryFunctionMap + conjDependencies: FactoryFunctionMap + imDependencies: FactoryFunctionMap + reDependencies: FactoryFunctionMap + notDependencies: FactoryFunctionMap + orDependencies: FactoryFunctionMap + xorDependencies: FactoryFunctionMap + concatDependencies: FactoryFunctionMap + columnDependencies: FactoryFunctionMap + crossDependencies: FactoryFunctionMap + diagDependencies: FactoryFunctionMap + eyeDependencies: FactoryFunctionMap + filterDependencies: FactoryFunctionMap + flattenDependencies: FactoryFunctionMap + forEachDependencies: FactoryFunctionMap + getMatrixDataTypeDependencies: FactoryFunctionMap + identityDependencies: FactoryFunctionMap + kronDependencies: FactoryFunctionMap + mapDependencies: FactoryFunctionMap + onesDependencies: FactoryFunctionMap + rangeDependencies: FactoryFunctionMap + reshapeDependencies: FactoryFunctionMap + resizeDependencies: FactoryFunctionMap + rowDependencies: FactoryFunctionMap + sizeDependencies: FactoryFunctionMap + squeezeDependencies: FactoryFunctionMap + subsetDependencies: FactoryFunctionMap + transposeDependencies: FactoryFunctionMap + ctransposeDependencies: FactoryFunctionMap + zerosDependencies: FactoryFunctionMap + erfDependencies: FactoryFunctionMap + modeDependencies: FactoryFunctionMap + prodDependencies: FactoryFunctionMap + formatDependencies: FactoryFunctionMap + printDependencies: FactoryFunctionMap + toDependencies: FactoryFunctionMap + isPrimeDependencies: FactoryFunctionMap + numericDependencies: FactoryFunctionMap + divideScalarDependencies: FactoryFunctionMap + powDependencies: FactoryFunctionMap + roundDependencies: FactoryFunctionMap + logDependencies: FactoryFunctionMap + log1pDependencies: FactoryFunctionMap + nthRootsDependencies: FactoryFunctionMap + dotPowDependencies: FactoryFunctionMap + dotDivideDependencies: FactoryFunctionMap + lsolveDependencies: FactoryFunctionMap + usolveDependencies: FactoryFunctionMap + leftShiftDependencies: FactoryFunctionMap + rightArithShiftDependencies: FactoryFunctionMap + rightLogShiftDependencies: FactoryFunctionMap + andDependencies: FactoryFunctionMap + compareDependencies: FactoryFunctionMap + compareNaturalDependencies: FactoryFunctionMap + compareTextDependencies: FactoryFunctionMap + equalDependencies: FactoryFunctionMap + equalTextDependencies: FactoryFunctionMap + smallerDependencies: FactoryFunctionMap + smallerEqDependencies: FactoryFunctionMap + largerDependencies: FactoryFunctionMap + largerEqDependencies: FactoryFunctionMap + deepEqualDependencies: FactoryFunctionMap + unequalDependencies: FactoryFunctionMap + partitionSelectDependencies: FactoryFunctionMap + sortDependencies: FactoryFunctionMap + maxDependencies: FactoryFunctionMap + minDependencies: FactoryFunctionMap + ImmutableDenseMatrixDependencies: FactoryFunctionMap + IndexDependencies: FactoryFunctionMap + FibonacciHeapDependencies: FactoryFunctionMap + SpaDependencies: FactoryFunctionMap + UnitDependencies: FactoryFunctionMap + unitDependencies: FactoryFunctionMap + sparseDependencies: FactoryFunctionMap + createUnitDependencies: FactoryFunctionMap + acosDependencies: FactoryFunctionMap + acoshDependencies: FactoryFunctionMap + acotDependencies: FactoryFunctionMap + acothDependencies: FactoryFunctionMap + acscDependencies: FactoryFunctionMap + acschDependencies: FactoryFunctionMap + asecDependencies: FactoryFunctionMap + asechDependencies: FactoryFunctionMap + asinDependencies: FactoryFunctionMap + asinhDependencies: FactoryFunctionMap + atanDependencies: FactoryFunctionMap + atan2Dependencies: FactoryFunctionMap + atanhDependencies: FactoryFunctionMap + cosDependencies: FactoryFunctionMap + coshDependencies: FactoryFunctionMap + cotDependencies: FactoryFunctionMap + cothDependencies: FactoryFunctionMap + cscDependencies: FactoryFunctionMap + cschDependencies: FactoryFunctionMap + secDependencies: FactoryFunctionMap + sechDependencies: FactoryFunctionMap + sinDependencies: FactoryFunctionMap + sinhDependencies: FactoryFunctionMap + tanDependencies: FactoryFunctionMap + tanhDependencies: FactoryFunctionMap + setCartesianDependencies: FactoryFunctionMap + setDifferenceDependencies: FactoryFunctionMap + setDistinctDependencies: FactoryFunctionMap + setIntersectDependencies: FactoryFunctionMap + setIsSubsetDependencies: FactoryFunctionMap + setMultiplicityDependencies: FactoryFunctionMap + setPowersetDependencies: FactoryFunctionMap + setSizeDependencies: FactoryFunctionMap + setSymDifferenceDependencies: FactoryFunctionMap + setUnionDependencies: FactoryFunctionMap + addDependencies: FactoryFunctionMap + hypotDependencies: FactoryFunctionMap + normDependencies: FactoryFunctionMap + dotDependencies: FactoryFunctionMap + traceDependencies: FactoryFunctionMap + indexDependencies: FactoryFunctionMap + NodeDependencies: FactoryFunctionMap + AccessorNodeDependencies: FactoryFunctionMap + ArrayNodeDependencies: FactoryFunctionMap + AssignmentNodeDependencies: FactoryFunctionMap + BlockNodeDependencies: FactoryFunctionMap + ConditionalNodeDependencies: FactoryFunctionMap + ConstantNodeDependencies: FactoryFunctionMap + FunctionAssignmentNodeDependencies: FactoryFunctionMap + IndexNodeDependencies: FactoryFunctionMap + ObjectNodeDependencies: FactoryFunctionMap + OperatorNodeDependencies: FactoryFunctionMap + ParenthesisNodeDependencies: FactoryFunctionMap + RangeNodeDependencies: FactoryFunctionMap + RelationalNodeDependencies: FactoryFunctionMap + SymbolNodeDependencies: FactoryFunctionMap + FunctionNodeDependencies: FactoryFunctionMap + parseDependencies: FactoryFunctionMap + compileDependencies: FactoryFunctionMap + evaluateDependencies: FactoryFunctionMap + evalDependencies: FactoryFunctionMap + ParserDependencies: FactoryFunctionMap + parserDependencies: FactoryFunctionMap + lupDependencies: FactoryFunctionMap + qrDependencies: FactoryFunctionMap + sluDependencies: FactoryFunctionMap + lusolveDependencies: FactoryFunctionMap + HelpDependencies: FactoryFunctionMap + ChainDependencies: FactoryFunctionMap + helpDependencies: FactoryFunctionMap + chainDependencies: FactoryFunctionMap + detDependencies: FactoryFunctionMap + invDependencies: FactoryFunctionMap + expmDependencies: FactoryFunctionMap + sqrtmDependencies: FactoryFunctionMap + divideDependencies: FactoryFunctionMap + distanceDependencies: FactoryFunctionMap + intersectDependencies: FactoryFunctionMap + sumDependencies: FactoryFunctionMap + meanDependencies: FactoryFunctionMap + medianDependencies: FactoryFunctionMap + madDependencies: FactoryFunctionMap + varianceDependencies: FactoryFunctionMap + varDependencies: FactoryFunctionMap + quantileSeqDependencies: FactoryFunctionMap + stdDependencies: FactoryFunctionMap + combinationsDependencies: FactoryFunctionMap + gammaDependencies: FactoryFunctionMap + factorialDependencies: FactoryFunctionMap + kldivergenceDependencies: FactoryFunctionMap + multinomialDependencies: FactoryFunctionMap + permutationsDependencies: FactoryFunctionMap + pickRandomDependencies: FactoryFunctionMap + randomDependencies: FactoryFunctionMap + randomIntDependencies: FactoryFunctionMap + stirlingS2Dependencies: FactoryFunctionMap + bellNumbersDependencies: FactoryFunctionMap + catalanDependencies: FactoryFunctionMap + compositionDependencies: FactoryFunctionMap + simplifyDependencies: FactoryFunctionMap + derivativeDependencies: FactoryFunctionMap + rationalizeDependencies: FactoryFunctionMap + reviverDependencies: FactoryFunctionMap + eDependencies: FactoryFunctionMap + EDependencies: FactoryFunctionMap + falseDependencies: FactoryFunctionMap + iDependencies: FactoryFunctionMap + InfinityDependencies: FactoryFunctionMap + LN10Dependencies: FactoryFunctionMap + LN2Dependencies: FactoryFunctionMap + LOG10EDependencies: FactoryFunctionMap + LOG2EDependencies: FactoryFunctionMap + NaNDependencies: FactoryFunctionMap + nullDependencies: FactoryFunctionMap + phiDependencies: FactoryFunctionMap + piDependencies: FactoryFunctionMap + PIDependencies: FactoryFunctionMap + SQRT1_2Dependencies: FactoryFunctionMap + SQRT2Dependencies: FactoryFunctionMap + tauDependencies: FactoryFunctionMap + trueDependencies: FactoryFunctionMap + versionDependencies: FactoryFunctionMap + atomicMassDependencies: FactoryFunctionMap + avogadroDependencies: FactoryFunctionMap + bohrMagnetonDependencies: FactoryFunctionMap + bohrRadiusDependencies: FactoryFunctionMap + boltzmannDependencies: FactoryFunctionMap + classicalElectronRadiusDependencies: FactoryFunctionMap + conductanceQuantumDependencies: FactoryFunctionMap + coulombDependencies: FactoryFunctionMap + deuteronMassDependencies: FactoryFunctionMap + efimovFactorDependencies: FactoryFunctionMap + electricConstantDependencies: FactoryFunctionMap + electronMassDependencies: FactoryFunctionMap + elementaryChargeDependencies: FactoryFunctionMap + faradayDependencies: FactoryFunctionMap + fermiCouplingDependencies: FactoryFunctionMap + fineStructureDependencies: FactoryFunctionMap + firstRadiationDependencies: FactoryFunctionMap + gasConstantDependencies: FactoryFunctionMap + gravitationConstantDependencies: FactoryFunctionMap + gravityDependencies: FactoryFunctionMap + hartreeEnergyDependencies: FactoryFunctionMap + inverseConductanceQuantumDependencies: FactoryFunctionMap + klitzingDependencies: FactoryFunctionMap + loschmidtDependencies: FactoryFunctionMap + magneticConstantDependencies: FactoryFunctionMap + magneticFluxQuantumDependencies: FactoryFunctionMap + molarMassDependencies: FactoryFunctionMap + molarMassC12Dependencies: FactoryFunctionMap + molarPlanckConstantDependencies: FactoryFunctionMap + molarVolumeDependencies: FactoryFunctionMap + neutronMassDependencies: FactoryFunctionMap + nuclearMagnetonDependencies: FactoryFunctionMap + planckChargeDependencies: FactoryFunctionMap + planckConstantDependencies: FactoryFunctionMap + planckLengthDependencies: FactoryFunctionMap + planckMassDependencies: FactoryFunctionMap + planckTemperatureDependencies: FactoryFunctionMap + planckTimeDependencies: FactoryFunctionMap + protonMassDependencies: FactoryFunctionMap + quantumOfCirculationDependencies: FactoryFunctionMap + reducedPlanckConstantDependencies: FactoryFunctionMap + rydbergDependencies: FactoryFunctionMap + sackurTetrodeDependencies: FactoryFunctionMap + secondRadiationDependencies: FactoryFunctionMap + speedOfLightDependencies: FactoryFunctionMap + stefanBoltzmannDependencies: FactoryFunctionMap + thomsonCrossSectionDependencies: FactoryFunctionMap + vacuumImpedanceDependencies: FactoryFunctionMap + weakMixingAngleDependencies: FactoryFunctionMap + wienDisplacementDependencies: FactoryFunctionMap + applyTransformDependencies: FactoryFunctionMap + columnTransformDependencies: FactoryFunctionMap + filterTransformDependencies: FactoryFunctionMap + forEachTransformDependencies: FactoryFunctionMap + indexTransformDependencies: FactoryFunctionMap + mapTransformDependencies: FactoryFunctionMap + maxTransformDependencies: FactoryFunctionMap + meanTransformDependencies: FactoryFunctionMap + minTransformDependencies: FactoryFunctionMap + rangeTransformDependencies: FactoryFunctionMap + rowTransformDependencies: FactoryFunctionMap + subsetTransformDependencies: FactoryFunctionMap + concatTransformDependencies: FactoryFunctionMap + stdTransformDependencies: FactoryFunctionMap + sumTransformDependencies: FactoryFunctionMap + varianceTransformDependencies: FactoryFunctionMap } interface Matrix { - type: string; - storage(): string; - datatype(): string; - create(data: MathArray, datatype?: string): void; - density(): number; - subset(index: Index, replacement?: any, defaultValue?: any): Matrix; - apply(dim: number, callback: (array: MathCollection) => number): Matrix | MathArray; - get(index: number[]): any; - set(index: number[], value: any, defaultValue?: number | string): Matrix; - resize(size: MathCollection, defaultValue?: number | string): Matrix; - clone(): Matrix; - size(): number[]; - map(callback: (a: any, b: number, c: Matrix) => any, skipZeros?: boolean): Matrix; - forEach(callback: (a: any, b: number, c: Matrix) => void, skipZeros?: boolean): void; - toArray(): MathArray; - valueOf(): MathArray; - format(options?: FormatOptions | number | ((value: any) => string)): string; - toString(): string; - toJSON(): any; - diagonal(k?: number | BigNumber): any[]; - swapRows(i: number, j: number): Matrix; + type: string + storage(): string + datatype(): string + create(data: MathArray, datatype?: string): void + density(): number + // eslint-disable-next-line @typescript-eslint/no-explicit-any + subset(index: Index, replacement?: any, defaultValue?: any): Matrix + apply( + dim: number, + callback: (array: MathCollection) => number + ): Matrix | MathArray + // eslint-disable-next-line @typescript-eslint/no-explicit-any + get(index: number[]): any + // eslint-disable-next-line @typescript-eslint/no-explicit-any + set(index: number[], value: any, defaultValue?: number | string): Matrix + resize(size: MathCollection, defaultValue?: number | string): Matrix + clone(): Matrix + size(): number[] + map( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + callback: (a: any, b: number, c: Matrix) => any, + skipZeros?: boolean + ): Matrix + forEach( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + callback: (a: any, b: number, c: Matrix) => void, + skipZeros?: boolean + ): void + toArray(): MathArray + valueOf(): MathArray + // eslint-disable-next-line @typescript-eslint/no-explicit-any + format(options?: FormatOptions | number | ((value: any) => string)): string + toString(): string + // eslint-disable-next-line @typescript-eslint/no-explicit-any + toJSON(): any + // eslint-disable-next-line @typescript-eslint/no-explicit-any + diagonal(k?: number | BigNumber): any[] + swapRows(i: number, j: number): Matrix } interface MatrixCtor { - new(): Matrix; + new (): Matrix } - interface BigNumber extends Decimal {} // tslint:disable-line no-empty-interface + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface BigNumber extends Decimal {} interface Fraction { - s: number; - n: number; - d: number; + s: number + n: number + d: number } interface Complex { - re: number; - im: number; - clone(): Complex; - equals(other: Complex): boolean; - format(precision?: number): string; - fromJSON(json: object): Complex; - fromPolar(polar: object): Complex; - fromPolar(r: number, phi: number): Complex; - toJSON(): object; - toPolar(): PolarCoordinates; - toString(): string; - compare(a: Complex, b: Complex): number; + re: number + im: number + clone(): Complex + equals(other: Complex): boolean + format(precision?: number): string + fromJSON(json: object): Complex + fromPolar(polar: object): Complex + fromPolar(r: number, phi: number): Complex + toJSON(): object + toPolar(): PolarCoordinates + toString(): string + compare(a: Complex, b: Complex): number } interface PolarCoordinates { - r: number; - phi: number; + r: number + phi: number } interface MathJSON { - mathjs?: string; - value: number; - unit: string; - fixPrefix?: boolean; + mathjs?: string + value: number + unit: string + fixPrefix?: boolean } interface UnitComponent { - power: number; - prefix: string; + power: number + prefix: string unit: { - name: string; + name: string base: { - dimensions: number[]; - key: string; - }; - prefixes: Record; - value: number; - offset: number; - dimensions: number[]; - }; + dimensions: number[] + key: string + } + prefixes: Record + value: number + offset: number + dimensions: number[] + } } interface UnitPrefix { - name: string; - value: number; - scientific: boolean; + name: string + value: number + scientific: boolean } interface Unit { - valueOf(): string; - clone(): Unit; - hasBase(base: any): boolean; - equalBase(unit: Unit): boolean; - equals(unit: Unit): boolean; - multiply(unit: Unit): Unit; - divide(unit: Unit): Unit; - pow(unit: Unit): Unit; - abs(unit: Unit): Unit; - to(unit: string): Unit; - toNumber(unit?: string): number; - toNumeric(unit?: string): number | Fraction | BigNumber; - toSI(): Unit; - toString(): string; - toJSON(): MathJSON; - formatUnits(): string; - format(options: FormatOptions): string; - simplify(): Unit; - splitUnit(parts: ReadonlyArray): Unit[]; + valueOf(): string + clone(): Unit + // eslint-disable-next-line @typescript-eslint/no-explicit-any + hasBase(base: any): boolean + equalBase(unit: Unit): boolean + equals(unit: Unit): boolean + multiply(unit: Unit): Unit + divide(unit: Unit): Unit + pow(unit: Unit): Unit + abs(unit: Unit): Unit + to(unit: string): Unit + toNumber(unit?: string): number + toNumeric(unit?: string): number | Fraction | BigNumber + toSI(): Unit + toString(): string + toJSON(): MathJSON + formatUnits(): string + format(options: FormatOptions): string + simplify(): Unit + splitUnit(parts: ReadonlyArray): Unit[] - units: UnitComponent[]; - dimensions: number[]; - value: number; - fixPrefix: boolean; - skipAutomaticSimplification: true; + units: UnitComponent[] + dimensions: number[] + value: number + fixPrefix: boolean + skipAutomaticSimplification: true } interface CreateUnitOptions { - prefixes?: 'none' | 'short' | 'long' | 'binary_short' | 'binary_long'; - aliases?: string[]; - offset?: number; - override?: boolean; + prefixes?: 'none' | 'short' | 'long' | 'binary_short' | 'binary_long' + aliases?: string[] + offset?: number + override?: boolean } interface SimplifyOptions { /** A boolean which is `true` by default. */ - exactFractions?: boolean; + exactFractions?: boolean /** * When `exactFractions` is true, a fraction will be returned only * when both numerator and denominator are smaller than `fractionsLimit`. * Default value is 10000. */ - fractionsLimit?: number; + fractionsLimit?: number } - type SimplifyRule = { l: string; r: string } | string | ((node: MathNode) => MathNode); + type SimplifyRule = + | { l: string; r: string } + | string + | ((node: MathNode) => MathNode) interface Simplify { ( - expr: MathNode | string, - rules?: SimplifyRule[], - scope?: object, - options?: SimplifyOptions, - ): MathNode; + expr: MathNode | string, + rules?: SimplifyRule[], + scope?: object, + options?: SimplifyOptions + ): MathNode ( - expr: MathNode | string, - scope?: object, - options?: SimplifyOptions, - ): MathNode; + expr: MathNode | string, + scope?: object, + options?: SimplifyOptions + ): MathNode - rules: SimplifyRule[]; + rules: SimplifyRule[] } interface UnitDefinition { - definition?: string | Unit; - prefixes?: string; - offset?: number; - aliases?: string[]; + definition?: string | Unit + prefixes?: string + offset?: number + aliases?: string[] } - interface Index {} // tslint:disable-line no-empty-interface + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface Index {} interface EvalFunction { - evaluate(scope?: any): any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + evaluate(scope?: any): any } interface MathNodeCommon { - isNode: true; - comment: string; - type: 'AccessorNode' | 'ArrayNode' | 'AssignmentNode' | 'BlockNode' | 'ConditionalNode' | 'ConstantNode' | - 'FunctionAssignmentNode' | 'FunctionNode' | 'IndexNode' | 'ObjectNode' | 'OperatorNode' | 'ParenthesisNode' | - 'RangeNode' | 'RelationalNode' | 'SymbolNode'; + isNode: true + comment: string + type: + | 'AccessorNode' + | 'ArrayNode' + | 'AssignmentNode' + | 'BlockNode' + | 'ConditionalNode' + | 'ConstantNode' + | 'FunctionAssignmentNode' + | 'FunctionNode' + | 'IndexNode' + | 'ObjectNode' + | 'OperatorNode' + | 'ParenthesisNode' + | 'RangeNode' + | 'RelationalNode' + | 'SymbolNode' - isUpdateNode?: boolean; + isUpdateNode?: boolean /** * Create a shallow clone of the node. The node itself is cloned, its * childs are not cloned. */ - clone(): MathNode; + clone(): MathNode /** * Create a deep clone of the node. Both the node as well as all its * childs are cloned recursively. */ - cloneDeep(): MathNode; + cloneDeep(): MathNode /** * Compile an expression into optimized JavaScript code. compile returns * an object with a function evaluate([scope]) to evaluate. Example: */ - compile(): EvalFunction; + compile(): EvalFunction /** * Compile and eval an expression, this is the equivalent of doing * node.compile().evaluate(scope). Example: */ - evaluate(expr?: any): any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + evaluate(expr?: any): any /** * Test whether this node equals an other node. Does a deep comparison * of the values of both nodes. */ - equals(other: MathNode): boolean; + equals(other: MathNode): boolean /** * * Filter nodes in an expression tree. The callback function is called @@ -3456,12 +3783,18 @@ declare namespace math { * containing a relative JSON Path. * @return Returns an array with nodes for which test returned true */ - filter(callback: (node: MathNode, path: string, parent: MathNode) => any): MathNode[]; + filter( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + callback: (node: MathNode, path: string, parent: MathNode) => any + ): MathNode[] /** * [forEach description] */ - forEach(callback: (node: MathNode, path: string, parent: MathNode) => any): MathNode[]; + forEach( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + callback: (node: MathNode, path: string, parent: MathNode) => any + ): MathNode[] /** * Transform a node. Creates a new MathNode having it’s child's be the @@ -3474,23 +3807,25 @@ declare namespace math { * * See also transform, which is a recursive version of map. */ - map(callback: (node: MathNode, path: string, parent: MathNode) => MathNode): MathNode; + map( + callback: (node: MathNode, path: string, parent: MathNode) => MathNode + ): MathNode /** * Get a HTML representation of the parsed expression. */ - toHTML(options?: object): string; + toHTML(options?: object): string /** * Get a string representation of the parsed expression. This is not * exactly the same as the original input. */ - toString(options?: object): string; + toString(options?: object): string /** * Get a LaTeX representation of the expression. */ - toTex(options?: object): string; + toTex(options?: object): string /** * Recursively transform an expression tree via a transform function. @@ -3517,7 +3852,9 @@ declare namespace math { * transformed.toString(); // returns '(3 ^ 2) + (5 * 3)' * ``` */ - transform(callback: (node: MathNode, path: string, parent: MathNode) => MathNode): MathNode; + transform( + callback: (node: MathNode, path: string, parent: MathNode) => MathNode + ): MathNode /** * `traverse(callback)` @@ -3548,21 +3885,31 @@ declare namespace math { * // ConstantMathNode 2 * ``` */ - traverse(callback: (node: MathNode, path: string, parent: MathNode) => void): any; + traverse( + callback: (node: MathNode, path: string, parent: MathNode) => void + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ): any } interface Parser { - evaluate(expr: string | string[]): any; - get(variable: string): any; - getAll(): { [key: string]: any }; - set: (variable: string, value: any) => void; - clear: () => void; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + evaluate(expr: string | string[]): any + // eslint-disable-next-line @typescript-eslint/no-explicit-any + get(variable: string): any + // eslint-disable-next-line @typescript-eslint/no-explicit-any + getAll(): { [key: string]: any } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + set: (variable: string, value: any) => void + clear: () => void } interface Distribution { - random(size: any, min?: any, max?: any): any; - randomInt(min: any, max?: any): any; - pickRandom(array: any): any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + random(size: any, min?: any, max?: any): any + // eslint-disable-next-line @typescript-eslint/no-explicit-any + randomInt(min: any, max?: any): any + // eslint-disable-next-line @typescript-eslint/no-explicit-any + pickRandom(array: any): any } interface FormatOptions { @@ -3575,7 +3922,7 @@ declare namespace math { * elsewhere. Lower bound is included, upper bound is excluded. For * example '123.4' and '1.4e7'. */ - notation?: 'fixed' | 'exponential' | 'engineering' | 'auto'; + notation?: 'fixed' | 'exponential' | 'engineering' | 'auto' /** * A number between 0 and 16 to round the digits of the number. In case @@ -3584,44 +3931,45 @@ declare namespace math { * case of notation 'fixed', precision defines the number of significant * digits after the decimal point, and is 0 by default. */ - precision?: number; + precision?: number /** * Exponent determining the lower boundary for formatting a value with * an exponent when notation='auto. Default value is -3. */ - lowerExp?: number; + lowerExp?: number /** * Exponent determining the upper boundary for formatting a value with * an exponent when notation='auto. Default value is 5. */ - upperExp?: number; + upperExp?: number /** * Available values: 'ratio' (default) or 'decimal'. For example * format(fraction(1, 3)) will output '1/3' when 'ratio' is configured, * and will output 0.(3) when 'decimal' is configured. */ - fraction?: string; + fraction?: string } interface Help { - toString(): string; - toJSON(): string; + toString(): string + toJSON(): string } interface ConfigOptions { - epsilon?: number; - matrix?: 'Matrix' | 'Array'; - number?: 'number' | 'BigNumber' | 'Fraction'; - precision?: number; - predictable?: boolean; - randomSeed?: string | null; + epsilon?: number + matrix?: 'Matrix' | 'Array' + number?: 'number' | 'BigNumber' | 'Fraction' + precision?: number + predictable?: boolean + randomSeed?: string | null } interface MathJsChain { - done(): any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + done(): any /************************************************************************* * Construction functions @@ -3632,7 +3980,7 @@ declare namespace math { * When a matrix is provided, all elements will be converted to * BigNumber. */ - bignumber(): MathJsChain; + bignumber(): MathJsChain /** * Create a boolean or convert a string or number to a boolean. In case @@ -3640,14 +3988,14 @@ declare namespace math { * of zero. Strings can be 'true' or 'false', or can contain a number. * When value is a matrix, all elements will be converted to boolean. */ - boolean(): MathJsChain; + boolean(): MathJsChain /** * Create a complex value or convert a value to a complex value. * @param im Argument specifying the imaginary part of the complex * number */ - complex(im?: number): MathJsChain; + complex(im?: number): MathJsChain /** * Create a user-defined unit and register it with the Unit type. @@ -3661,7 +4009,10 @@ declare namespace math { * the unit. For example, the offset for celsius is 273.15. Default is * 0. */ - createUnit(definition?: string | UnitDefinition, options?: CreateUnitOptions): MathJsChain; + createUnit( + definition?: string | UnitDefinition, + options?: CreateUnitOptions + ): MathJsChain /** * Create a user-defined unit and register it with the Unit type. * @param options (optional) An object containing any of the following @@ -3672,21 +4023,21 @@ declare namespace math { * the unit. For example, the offset for celsius is 273.15. Default is * 0. */ - createUnit(options?: CreateUnitOptions): MathJsChain; + createUnit(options?: CreateUnitOptions): MathJsChain /** * Create a fraction convert a value to a fraction. * @param denominator Argument specifying the denominator of the * fraction */ - fraction(denominator?: number | string | MathCollection): MathJsChain; + fraction(denominator?: number | string | MathCollection): MathJsChain /** * Create an index. An Index can store ranges having start, step, and * end for multiple dimensions. Matrix.get, Matrix.set, and math.subset * accept an Index as input. */ - index(): MathJsChain; + index(): MathJsChain /** * Create a Matrix. The function creates a new math.type.Matrix object @@ -3694,7 +4045,7 @@ declare namespace math { * in the matrix, like getting the size and getting or setting values in * the matrix. Supported storage formats are 'dense' and 'sparse'. */ - matrix(format?: 'sparse' | 'dense', dataType?: string): MathJsChain; + matrix(format?: 'sparse' | 'dense', dataType?: string): MathJsChain /** * Create a number or convert a string, boolean, or unit to a number. @@ -3702,7 +4053,7 @@ declare namespace math { * @param valuelessUnit A valueless unit, used to convert a unit to a * number */ - number(valuelessUnit?: Unit | string): MathJsChain; + number(valuelessUnit?: Unit | string): MathJsChain /** * Create a Sparse Matrix. The function creates a new math.type.Matrix @@ -3711,20 +4062,20 @@ declare namespace math { * values in the matrix. * @param dataType Sparse Matrix data type */ - sparse(dataType?: string): MathJsChain; + sparse(dataType?: string): MathJsChain /** * Split a unit in an array of units whose sum is equal to the original * unit. * @param parts An array of strings or valueless units */ - splitUnit(parts: Unit[]): MathJsChain; + splitUnit(parts: Unit[]): MathJsChain /** * Create a string or convert any object into a string. Elements of * Arrays and Matrices are processed element wise. */ - string(): MathJsChain; + string(): MathJsChain /** * Create a unit. Depending on the passed arguments, the function will @@ -3732,7 +4083,7 @@ declare namespace math { * provided, all elements will be converted to units. * @param unit The unit to be created */ - unit(unit?: string): MathJsChain; + unit(unit?: string): MathJsChain /************************************************************************* * Expression functions @@ -3742,36 +4093,38 @@ declare namespace math { * Parse and compile an expression. Returns a an object with a function * evaluate([scope]) to evaluate the compiled expression. */ - compile(): MathJsChain; + compile(): MathJsChain /** * Evaluate an expression. * @param scope Scope to read/write variables */ - evaluate(scope?: object): MathJsChain; + evaluate(scope?: object): MathJsChain /** * Retrieve help on a function or data type. Help files are retrieved * from the documentation in math.expression.docs. */ - help(): MathJsChain; + help(): MathJsChain /** * Parse an expression. Returns a node tree, which can be evaluated by * invoking node.evaluate(); * @param options Available options: nodes - a set of custome nodes */ - parse(options?: any): MathJsChain; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + parse(options?: any): MathJsChain /** * @param options Available options: nodes - a set of custome nodes */ - parse(options?: any): MathJsChain; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + parse(options?: any): MathJsChain /** * Create a parser. The function creates a new math.expression.Parser * object. */ - parser(): MathJsChain; + parser(): MathJsChain /************************************************************************* * Algebra functions @@ -3781,21 +4134,24 @@ declare namespace math { * @param options There is one option available, simplify, which is true * by default. When false, output will not be simplified. */ - derivative(variable: MathNode | string, options?: { simplify: boolean }): MathJsChain; + derivative( + variable: MathNode | string, + options?: { simplify: boolean } + ): MathJsChain /** * Solves the linear equation system by forwards substitution. Matrix * must be a lower triangular matrix. * @param b A column vector with the b values */ - lsolve(b: Matrix | MathArray): MathJsChain; + lsolve(b: Matrix | MathArray): MathJsChain /** * Calculate the Matrix LU decomposition with partial pivoting. Matrix A * is decomposed in two matrices (L, U) and a row permutation vector p * where A[p,:] = L * U */ - lup(): MathJsChain; + lup(): MathJsChain /** * Solves the linear system A * x = b where A is an [n x n] matrix and b @@ -3806,14 +4162,18 @@ declare namespace math { * @param threshold Partial pivoting threshold (1 for partial pivoting), * see slu for details. Matrix must be a SparseMatrix. */ - lusolve(b: Matrix | MathArray, order?: number, threshold?: number): MathJsChain; + lusolve( + b: Matrix | MathArray, + order?: number, + threshold?: number + ): MathJsChain /** * Calculate the Matrix QR decomposition. Matrix A is decomposed in two * matrices (Q, R) where Q is an orthogonal matrix and R is an upper * triangular matrix. */ - qr(): MathJsChain; + qr(): MathJsChain /** * Transform a rationalizable expression in a rational fraction. If @@ -3825,7 +4185,7 @@ declare namespace math { * @param detailed optional True if return an object, false if return * expression node (default) */ - rationalize(optional?: object | boolean, detailed?: boolean): MathJsChain; + rationalize(optional?: object | boolean, detailed?: boolean): MathJsChain /** * Simplify an expression tree. @@ -3835,9 +4195,9 @@ declare namespace math { * can be specified as an object, string, or function. * @param scope Scope to variables */ - simplify(rules?: SimplifyRule[], scope?: object): MathJsChain; + simplify(rules?: SimplifyRule[], scope?: object): MathJsChain - simplifyCore(expr: MathNode): MathNode; + simplifyCore(expr: MathNode): MathNode /** * Calculate the Sparse Matrix LU decomposition with full pivoting. @@ -3854,14 +4214,14 @@ declare namespace math { * with more than 10*sqr(columns) entries. * @param threshold Partial pivoting threshold (1 for partial pivoting) */ - slu(order: number, threshold: number): MathJsChain; + slu(order: number, threshold: number): MathJsChain /** * Solves the linear equation system by backward substitution. Matrix * must be an upper triangular matrix. U * x = b * @param b A column vector with the b values */ - usolve(b: Matrix | MathArray): MathJsChain; + usolve(b: Matrix | MathArray): MathJsChain /************************************************************************* * Arithmetic functions @@ -3871,14 +4231,14 @@ declare namespace math { * Calculate the absolute value of a number. For matrices, the function * is evaluated element wise. */ - abs(): MathJsChain; + abs(): MathJsChain /** * Add two values, x + y. For matrices, the function is evaluated * element wise. * @param y Second value to add */ - add(y: MathType): MathJsChain; + add(y: MathType): MathJsChain /** * Apply a function that maps an array to a scalar along a given axis of the @@ -3889,7 +4249,10 @@ declare namespace math { * array or 1-d matrix as an input and return a number. * @returns The residual matrix with the function applied over some dimension. */ - apply(dim: number, callback: (array: Array | Matrix) => number): MathJsChain; + apply( + dim: number, + callback: (array: Array | Matrix) => number + ): MathJsChain /** * Calculate the cubic root of a value. For matrices, the function is @@ -3898,7 +4261,7 @@ declare namespace math { * a number or complex number. If true, all complex roots are returned, * if false (default) the principal root is returned. */ - cbrt(allRoots?: boolean): MathJsChain; + cbrt(allRoots?: boolean): MathJsChain // Rounding functions grouped for similarity @@ -3908,28 +4271,28 @@ declare namespace math { * function is evaluated element wise. * @param n Number of decimals Default value: 0. */ - ceil(n?: number | BigNumber | MathCollection): MathJsChain; + ceil(n?: number | BigNumber | MathCollection): MathJsChain /** * Round a value towards zero. For matrices, the function is evaluated * element wise. * @param n Number of decimals Default value: 0. */ - fix(n?: number | BigNumber | MathCollection): MathJsChain; + fix(n?: number | BigNumber | MathCollection): MathJsChain /** * Round a value towards minus infinity. For matrices, the function is * evaluated element wise. * @param n Number of decimals Default value: 0. */ - floor(n?: number | BigNumber | MathCollection): MathJsChain; + floor(n?: number | BigNumber | MathCollection): MathJsChain /** * Round a value towards the nearest integer. For matrices, the function * is evaluated element wise. * @param n Number of decimals Default value: 0. */ - round(n?: number | BigNumber | MathCollection): MathJsChain; + round(n?: number | BigNumber | MathCollection): MathJsChain // End of rounding group @@ -3937,52 +4300,52 @@ declare namespace math { * Compute the cube of a value, x * x * x. For matrices, the function is * evaluated element wise. */ - cube(): MathJsChain; + cube(): MathJsChain /** * Divide two values, x / y. To divide matrices, x is multiplied with * the inverse of y: x * inv(y). * @param y Denominator */ - divide(y: MathType): MathJsChain; + divide(y: MathType): MathJsChain /** * Divide two matrices element wise. The function accepts both matrices * and scalar values. * @param y Denominator */ - dotDivide(y: MathType): MathJsChain; + dotDivide(y: MathType): MathJsChain /** * Multiply two matrices element wise. The function accepts both * matrices and scalar values. * @param y Right hand value */ - dotMultiply(y: MathType): MathJsChain; + dotMultiply(y: MathType): MathJsChain /** * Calculates the power of x to y element wise. * @param y The exponent */ - dotPow(y: MathType): MathJsChain; + dotPow(y: MathType): MathJsChain /** * Calculate the exponent of a value. For matrices, the function is * evaluated element wise. */ - exp(): MathJsChain; + exp(): MathJsChain /** * Calculate the value of subtracting 1 from the exponential value. For * matrices, the function is evaluated element wise. */ - expm1(): MathJsChain; + expm1(): MathJsChain /** * Calculate the greatest common divisor for two or more values or * arrays. For matrices, the function is evaluated element wise. */ - gcd(): MathJsChain; + gcd(): MathJsChain /** * Calculate the hypotenusa of a list with values. The hypotenusa is @@ -3990,7 +4353,7 @@ declare namespace math { * matrix input, the hypotenusa is calculated for all values in the * matrix. */ - hypot(): MathJsChain; + hypot(): MathJsChain /** * Calculate the least common multiple for two or more values or arrays. @@ -3998,7 +4361,7 @@ declare namespace math { * the function is evaluated element wise. * @param b An integer number */ - lcm(b: number | BigNumber | MathCollection): MathJsChain; + lcm(b: number | BigNumber | MathCollection): MathJsChain /** * Calculate the logarithm of a value. For matrices, the function is @@ -4006,24 +4369,24 @@ declare namespace math { * @param base Optional base for the logarithm. If not provided, the * natural logarithm of x is calculated. Default value: e. */ - log(base?: number | BigNumber | Complex): MathJsChain; + log(base?: number | BigNumber | Complex): MathJsChain /** * Calculate the 10-base of a value. This is the same as calculating * log(x, 10). For matrices, the function is evaluated element wise. */ - log10(): MathJsChain; + log10(): MathJsChain /** * Calculate the logarithm of a value+1. For matrices, the function is * evaluated element wise. */ - log1p(base?: number | BigNumber | Complex): MathJsChain; + log1p(base?: number | BigNumber | Complex): MathJsChain /** * Calculate the 2-base of a value. This is the same as calculating * log(x, 2). For matrices, the function is evaluated element wise. */ - log2(): MathJsChain; + log2(): MathJsChain /** * Calculates the modulus, the remainder of an integer division. For * matrices, the function is evaluated element wise. The modulus is @@ -4031,14 +4394,14 @@ declare namespace math { * @see http://en.wikipedia.org/wiki/Modulo_operation. * @param y Divisor */ - mod(y: number | BigNumber | Fraction | MathCollection): MathJsChain; + mod(y: number | BigNumber | Fraction | MathCollection): MathJsChain /** * Multiply two values, x * y. The result is squeezed. For matrices, the * matrix product is calculated. * @param y The second value to multiply */ - multiply(y: MathType): MathJsChain; + multiply(y: MathType): MathJsChain /** * Calculate the norm of a number, vector or matrix. The second @@ -4047,7 +4410,7 @@ declare namespace math { * -Infinity. Supported strings are: 'inf', '-inf', and 'fro' (The * Frobenius norm) Default value: 2. */ - norm(p?: number | BigNumber | string): MathJsChain; + norm(p?: number | BigNumber | string): MathJsChain /** * Calculate the nth root of a value. The principal nth root of a @@ -4055,14 +4418,14 @@ declare namespace math { * x^root = A For matrices, the function is evaluated element wise. * @param root The root. Default value: 2. */ - nthRoot(root?: number | BigNumber): MathJsChain; + nthRoot(root?: number | BigNumber): MathJsChain /** * Calculates the power of x to y, x ^ y. Matrix exponentiation is * supported for square matrices x, and positive integer exponents y. * @param y The exponent */ - pow(y: number | BigNumber): MathJsChain; + pow(y: number | BigNumber): MathJsChain /** * Compute the sign of a value. The sign of a value x is: 1 when x > 1 @@ -4071,26 +4434,26 @@ declare namespace math { * @param x The number for which to determine the sign * @returns The sign of x */ - sign(x: number | BigNumber): MathJsChain; + sign(x: number | BigNumber): MathJsChain /** * Calculate the square root of a value. For matrices, the function is * evaluated element wise. */ - sqrt(): MathJsChain; + sqrt(): MathJsChain /** * Compute the square of a value, x * x. For matrices, the function is * evaluated element wise. */ - square(): MathJsChain; + square(): MathJsChain /** * Subtract two values, x - y. For matrices, the function is evaluated * element wise. * @param y Value to subtract from x */ - subtract(y: MathType): MathJsChain; + subtract(y: MathType): MathJsChain /** * Inverse the sign of a value, apply a unary minus operation. For @@ -4098,21 +4461,21 @@ declare namespace math { * strings will be converted to a number. For complex numbers, both real * and complex value are inverted. */ - unaryMinus(): MathJsChain; + unaryMinus(): MathJsChain /** * Unary plus operation. Boolean values and strings will be converted to * a number, numeric values will be returned as is. For matrices, the * function is evaluated element wise. */ - unaryPlus(): MathJsChain; + unaryPlus(): MathJsChain /** * Calculate the extended greatest common divisor for two values. See * http://en.wikipedia.org/wiki/Extended_Euclidean_algorithm. * @param b An integer number */ - xgcd(b: number | BigNumber): MathJsChain; + xgcd(b: number | BigNumber): MathJsChain /************************************************************************* * Bitwise functions @@ -4123,14 +4486,14 @@ declare namespace math { * evaluated element wise. * @param y Second value to and */ - bitAnd(y: number | BigNumber | MathCollection): MathJsChain; + bitAnd(y: number | BigNumber | MathCollection): MathJsChain /** * Bitwise NOT value, ~x. For matrices, the function is evaluated * element wise. For units, the function is evaluated on the best prefix * base. */ - bitNot(): MathJsChain; + bitNot(): MathJsChain /** * Bitwise OR two values, x | y. For matrices, the function is evaluated @@ -4138,14 +4501,14 @@ declare namespace math { * print base. * @param y Second value to or */ - bitOr(y: number | BigNumber | MathCollection): MathJsChain; + bitOr(y: number | BigNumber | MathCollection): MathJsChain /** * Bitwise XOR two values, x ^ y. For matrices, the function is * evaluated element wise. * @param y Second value to xor */ - bitXor(y: number | BigNumber | MathCollection): MathJsChain; + bitXor(y: number | BigNumber | MathCollection): MathJsChain /** * Bitwise left logical shift of a value x by y number of bits, x << y. @@ -4153,7 +4516,7 @@ declare namespace math { * function is evaluated on the best prefix base. * @param y Amount of shifts */ - leftShift(y: number | BigNumber): MathJsChain; + leftShift(y: number | BigNumber): MathJsChain /** * Bitwise right arithmetic shift of a value x by y number of bits, x >> @@ -4161,7 +4524,7 @@ declare namespace math { * the function is evaluated on the best prefix base. * @param y Amount of shifts */ - rightArithShift(y: number | BigNumber): MathJsChain; + rightArithShift(y: number | BigNumber): MathJsChain /** * Bitwise right logical shift of value x by y number of bits, x >>> y. @@ -4169,7 +4532,7 @@ declare namespace math { * function is evaluated on the best prefix base. * @param y Amount of shifts */ - rightLogShift(y: number): MathJsChain; + rightLogShift(y: number): MathJsChain /************************************************************************* * Combinatorics functions @@ -4181,21 +4544,21 @@ declare namespace math { * takes integer arguments. The following condition must be enforced: n * >= 0 */ - bellNumbers(): MathJsChain; + bellNumbers(): MathJsChain /** * The Catalan Numbers enumerate combinatorial structures of many * different types. catalan only takes integer arguments. The following * condition must be enforced: n >= 0 */ - catalan(): MathJsChain; + catalan(): MathJsChain /** * The composition counts of n into k parts. Composition only takes * integer arguments. The following condition must be enforced: k <= n. * @param k Number of objects in the subset */ - composition(k: number | BigNumber): MathJsChain; + composition(k: number | BigNumber): MathJsChain /** * The Stirling numbers of the second kind, counts the number of ways to @@ -4205,7 +4568,7 @@ declare namespace math { * 1 * @param k Number of objects in the subset */ - stirlingS2(k: number | BigNumber): MathJsChain; + stirlingS2(k: number | BigNumber): MathJsChain /************************************************************************* * Complex functions @@ -4216,28 +4579,28 @@ declare namespace math { * the argument is computed as atan2(b, a). For matrices, the function * is evaluated element wise. */ - arg(): MathJsChain; + arg(): MathJsChain /** * Compute the complex conjugate of a complex value. If x = a+bi, the * complex conjugate of x is a - bi. For matrices, the function is * evaluated element wise. */ - conj(): MathJsChain; + conj(): MathJsChain /** * Get the imaginary part of a complex number. For a complex number a + * bi, the function returns b. For matrices, the function is evaluated * element wise. */ - im(): MathJsChain; + im(): MathJsChain /** * Get the real part of a complex number. For a complex number a + bi, * the function returns a. For matrices, the function is evaluated * element wise. */ - re(): MathJsChain; + re(): MathJsChain /************************************************************************* * Geometry functions @@ -4253,7 +4616,7 @@ declare namespace math { * c) * @param y Coordinates of the second point */ - distance(y: MathCollection | object): MathJsChain; + distance(y: MathCollection | object): MathJsChain /** * Calculates the point of intersection of two lines in two or three @@ -4268,7 +4631,11 @@ declare namespace math { * @param z Co-ordinates of second end-point of second line OR null if * the calculation is for line and plane */ - intersect(x: MathCollection, y: MathCollection, z: MathCollection): MathJsChain; + intersect( + x: MathCollection, + y: MathCollection, + z: MathCollection + ): MathJsChain /************************************************************************* * Logical functions @@ -4280,13 +4647,13 @@ declare namespace math { * element wise. * @param y Second value to and */ - and(y: number | BigNumber | Complex | Unit | MathCollection): MathJsChain; + and(y: number | BigNumber | Complex | Unit | MathCollection): MathJsChain /** * Logical not. Flips boolean value of a given parameter. For matrices, * the function is evaluated element wise. */ - not(): MathJsChain; + not(): MathJsChain /** * Logical or. Test if at least one value is defined with a @@ -4294,7 +4661,7 @@ declare namespace math { * element wise. * @param y Second value to or */ - or(y: number | BigNumber | Complex | Unit | MathCollection): MathJsChain; + or(y: number | BigNumber | Complex | Unit | MathCollection): MathJsChain /** * Logical xor. Test whether one and only one value is defined with a @@ -4302,7 +4669,7 @@ declare namespace math { * element wise. * @param y Second value to xor */ - xor(y: number | BigNumber | Complex | Unit | MathCollection): MathJsChain; + xor(y: number | BigNumber | Complex | Unit | MathCollection): MathJsChain /************************************************************************* * Matrix functions @@ -4313,7 +4680,7 @@ declare namespace math { * dimension over which to concatenate the matrices. By default the last * dimension of the matrices. */ - concat(): MathJsChain; + concat(): MathJsChain /** * Calculate the cross product for two vectors in three dimensional @@ -4322,12 +4689,12 @@ declare namespace math { * * b2 - a2 * b1 ] * @param y Second vector */ - cross(y: MathCollection): MathJsChain; + cross(y: MathCollection): MathJsChain /** * Calculate the determinant of a matrix. */ - det(): MathJsChain; + det(): MathJsChain /** * Create a diagonal matrix or retrieve the diagonal of a matrix. When x @@ -4340,8 +4707,8 @@ declare namespace math { * retrieved. Default value: 0. * @param format The matrix storage format. Default value: 'dense'. */ - diag(format?: string): MathJsChain; - diag(k: number | BigNumber, format?: string): MathJsChain; + diag(format?: string): MathJsChain + diag(k: number | BigNumber, format?: string): MathJsChain /** * Calculate the dot product of two vectors. The dot product of A = [a1, @@ -4349,7 +4716,7 @@ declare namespace math { * B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn * @param y Second vector */ - dot(y: MathCollection): MathJsChain; + dot(y: MathCollection): MathJsChain /** * Compute the matrix exponential, expm(A) = e^A. The matrix must be @@ -4358,46 +4725,52 @@ declare namespace math { * approximant with scaling and squaring; see “Nineteen Dubious Ways to * Compute the Exponential of a Matrix,” by Moler and Van Loan. */ - expm(): MathJsChain; + expm(): MathJsChain /** * Create a 2-dimensional identity matrix with size m x n or n x n. The * matrix has ones on the diagonal and zeros elsewhere. * @param format The Matrix storage format */ - identity(format?: string): MathJsChain; + identity(format?: string): MathJsChain /** * @param n The y dimension for the matrix * @param format The Matrix storage format */ - identity(n: number, format?: string): MathJsChain; + identity(n: number, format?: string): MathJsChain /** * Filter the items in an array or one dimensional matrix. */ - filter(test: ((value: any, index: any, matrix: Matrix | MathArray) => boolean) | RegExp): MathJsChain; + filter( + test: // eslint-disable-next-line @typescript-eslint/no-explicit-any + ((value: any, index: any, matrix: Matrix | MathArray) => boolean) | RegExp + ): MathJsChain /** * Flatten a multi dimensional matrix into a single dimensional matrix. */ - flatten(): MathJsChain; + flatten(): MathJsChain /** * Iterate over all elements of a matrix/array, and executes the given * callback function. */ - forEach(callback: (value: any, index: any, matrix: Matrix | MathArray) => void): MathJsChain; + forEach( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + callback: (value: any, index: any, matrix: Matrix | MathArray) => void + ): MathJsChain /** * Calculate the inverse of a square matrix. */ - inv(): MathJsChain; + inv(): MathJsChain /** * Calculate the kronecker product of two matrices or vectors * @param y Second vector */ - kron(y: Matrix | MathArray): MathJsChain; + kron(y: Matrix | MathArray): MathJsChain /** * Iterate over all elements of a matrix/array, and executes the given @@ -4406,18 +4779,26 @@ declare namespace math { * parameters: the value of the element, the index of the element, and * the Matrix/array being traversed. */ - map(callback: (value: any, index: any, matrix: Matrix | MathArray) => Matrix | MathArray): MathJsChain; + map( + callback: ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + value: any, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + index: any, + matrix: Matrix | MathArray + ) => Matrix | MathArray + ): MathJsChain /** * Create a matrix filled with ones. The created matrix can have one or * multiple dimensions. * @param format The matrix storage format */ - ones(format?: string): MathJsChain; + ones(format?: string): MathJsChain /** * @param format The matrix storage format */ - ones(n: number, format?: string): MathJsChain; + ones(n: number, format?: string): MathJsChain /** * Partition-based selection of an array or 1D matrix. Will find the kth * smallest value, and mutates the input array. Uses Quickselect. @@ -4426,7 +4807,11 @@ declare namespace math { * called as compare(a, b), and must return 1 when a > b, -1 when a < b, * and 0 when a == b. Default value: 'asc'. */ - partitionSelect(k: number, compare?: 'asc' | 'desc' | ((a: any, b: any) => number)): MathJsChain; + partitionSelect( + k: number, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + compare?: 'asc' | 'desc' | ((a: any, b: any) => number) + ): MathJsChain /** * Create an array from a range. By default, the range end is excluded. @@ -4437,16 +4822,20 @@ declare namespace math { * @param includeEnd: Option to specify whether to include the end or * not. False by default */ - range(includeEnd?: boolean): Matrix; - range(end: number | BigNumber, includeEnd?: boolean): MathJsChain; - range(end: number | BigNumber, step: number | BigNumber, includeEnd?: boolean): MathJsChain; + range(includeEnd?: boolean): Matrix + range(end: number | BigNumber, includeEnd?: boolean): MathJsChain + range( + end: number | BigNumber, + step: number | BigNumber, + includeEnd?: boolean + ): MathJsChain /** * Reshape a multi dimensional array to fit the specified dimensions * @param sizes One dimensional array with integral sizes for each * dimension */ - reshape(sizes: number[]): MathJsChain; + reshape(sizes: number[]): MathJsChain /** * Resize a matrix @@ -4454,12 +4843,12 @@ declare namespace math { * @param defaultValue Zero by default, except in case of a string, in * that case defaultValue = ' ' Default value: 0. */ - resize(size: MathCollection, defaultValue?: number | string): MathJsChain; + resize(size: MathCollection, defaultValue?: number | string): MathJsChain /** * Calculate the size of a matrix or scalar. */ - size(): MathJsChain; + size(): MathJsChain /** * Sort the items in a matrix @@ -4467,19 +4856,22 @@ declare namespace math { * is called as compare(a, b), and must return 1 when a > b, -1 when a < * b, and 0 when a == b. Default value: ‘asc’ */ - sort(compare: ((a: any, b: any) => number) | 'asc' | 'desc' | 'natural'): MathJsChain; + sort( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + compare: ((a: any, b: any) => number) | 'asc' | 'desc' | 'natural' + ): MathJsChain /** * Calculate the principal square root of a square matrix. The principal * square root matrix X of another matrix A is such that X * X = A. */ - sqrtm(): MathJsChain; + sqrtm(): MathJsChain /** * Squeeze a matrix, remove inner and outer singleton dimensions from a * matrix. */ - squeeze(): MathJsChain; + squeeze(): MathJsChain /** * Get or set a subset of a matrix or string. @@ -4491,19 +4883,20 @@ declare namespace math { * matrix is resized. If not provided, math.matrix elements will be left * undefined. Default value: undefined. */ - subset(index: Index, replacement?: any, defaultValue?: any): MathJsChain; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + subset(index: Index, replacement?: any, defaultValue?: any): MathJsChain /** * Calculate the trace of a matrix: the sum of the elements on the main * diagonal of a square matrix. */ - trace(): MathJsChain; + trace(): MathJsChain /** * Transpose a matrix. All values of the matrix are reflected over its * main diagonal. Only two dimensional matrices are supported. */ - transpose(): MathJsChain; + transpose(): MathJsChain /** * Create a matrix filled with zeros. The created matrix can have one or @@ -4511,12 +4904,12 @@ declare namespace math { * @param format The matrix storage format * @returns A matrix filled with zeros */ - zeros(format?: string): MathJsChain; + zeros(format?: string): MathJsChain /** * @param n The y dimension of the matrix * @param format The matrix storage format */ - zeros(n: number, format?: string): MathJsChain; + zeros(n: number, format?: string): MathJsChain /************************************************************************* * Probability functions @@ -4528,28 +4921,28 @@ declare namespace math { * following condition must be enforced: k <= n. * @param k Number of objects in the subset */ - combinations(k: number | BigNumber): MathJsChain; + combinations(k: number | BigNumber): MathJsChain /** * Compute the factorial of a value Factorial only supports an integer * value as argument. For matrices, the function is evaluated element * wise. */ - factorial(): MathJsChain; + factorial(): MathJsChain /** * Compute the gamma function of a value using Lanczos approximation for * small values, and an extended Stirling approximation for large * values. For matrices, the function is evaluated element wise. */ - gamma(): MathJsChain; + gamma(): MathJsChain /** * Calculate the Kullback-Leibler (KL) divergence between two * distributions * @param p Second vector */ - kldivergence(p: MathCollection): MathJsChain; + kldivergence(p: MathCollection): MathJsChain /** * Multinomial Coefficients compute the number of ways of picking a1, @@ -4557,7 +4950,7 @@ declare namespace math { * takes one array of integers as an argument. The following condition * must be enforced: every ai <= 0 */ - multinomial(): MathJsChain; + multinomial(): MathJsChain /** * Compute the number of ways of obtaining an ordered subset of k @@ -4565,7 +4958,7 @@ declare namespace math { * arguments. The following condition must be enforced: k <= n. * @param k The number of objects in the subset */ - permutations(k?: number | BigNumber): MathJsChain; + permutations(k?: number | BigNumber): MathJsChain /** * Random pick a value from a one dimensional array. Array element is @@ -4573,7 +4966,7 @@ declare namespace math { * @param number An int or float * @param weights An array of ints or floats */ - pickRandom(number?: number, weights?: number[]): MathJsChain; + pickRandom(number?: number, weights?: number[]): MathJsChain /** * Return a random number larger or equal to min and smaller than max @@ -4581,9 +4974,9 @@ declare namespace math { * @param min Minimum boundary for the random value, included * @param max Maximum boundary for the random value, excluded */ - random(max?: number): MathJsChain; + random(max?: number): MathJsChain // tslint:disable-next-line unified-signatures - random(min: number, max: number): MathJsChain; + random(min: number, max: number): MathJsChain /** * Return a random integer number larger or equal to min and smaller @@ -4591,9 +4984,9 @@ declare namespace math { * @param min Minimum boundary for the random value, included * @param max Maximum boundary for the random value, excluded */ - randomInt(max?: number): MathJsChain; + randomInt(max?: number): MathJsChain // tslint:disable-next-line unified-signatures - randomInt(min: number, max: number): MathJsChain; + randomInt(min: number, max: number): MathJsChain /************************************************************************* * Relational functions @@ -4607,7 +5000,7 @@ declare namespace math { * For matrices, the function is evaluated element wise. * @param y Second value to compare */ - compare(y: MathType | string): MathJsChain; + compare(y: MathType | string): MathJsChain /** * Compare two values of any type in a deterministic, natural way. For @@ -4616,7 +5009,8 @@ declare namespace math { * compares in a natural way. * @param y Second value to compare */ - compareNatural(y: any): MathJsChain; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + compareNatural(y: any): MathJsChain /** * Compare two strings lexically. Comparison is case sensitive. Returns @@ -4624,14 +5018,14 @@ declare namespace math { * function is evaluated element wise. * @param y Second string to compare */ - compareText(y: string | MathCollection): MathJsChain; + compareText(y: string | MathCollection): MathJsChain /** * Test element wise whether two matrices are equal. The function * accepts both matrices and scalar values. * @param y Second amtrix to compare */ - deepEqual(y: MathType): MathJsChain; + deepEqual(y: MathType): MathJsChain /** * Test whether two values are equal. @@ -4645,14 +5039,14 @@ declare namespace math { * else, and undefined is only equal to undefined and nothing else. * @param y Second value to compare */ - equal(y: MathType | string): MathJsChain; + equal(y: MathType | string): MathJsChain /** * Check equality of two strings. Comparison is case sensitive. For * matrices, the function is evaluated element wise. * @param y Second string to compare */ - equalText(y: string | MathCollection): MathJsChain; + equalText(y: string | MathCollection): MathJsChain /** * Test whether value x is larger than y. The function returns true when @@ -4662,7 +5056,7 @@ declare namespace math { * function is evaluated element wise. * @param y Second value to compare */ - larger(y: MathType | string): MathJsChain; + larger(y: MathType | string): MathJsChain /** * Test whether value x is larger or equal to y. The function returns @@ -4672,7 +5066,7 @@ declare namespace math { * the function is evaluated element wise. * @param y Second value to vcompare */ - largerEq(y: MathType | string): MathJsChain; + largerEq(y: MathType | string): MathJsChain /** * Test whether value x is smaller than y. The function returns true @@ -4682,7 +5076,7 @@ declare namespace math { * the function is evaluated element wise. * @param y Second value to vcompare */ - smaller(y: MathType | string): MathJsChain; + smaller(y: MathType | string): MathJsChain /** * Test whether value x is smaller or equal to y. The function returns @@ -4692,7 +5086,7 @@ declare namespace math { * matrices, the function is evaluated element wise. * @param y Second value to compare */ - smallerEq(y: MathType | string): MathJsChain; + smallerEq(y: MathType | string): MathJsChain /** * Test whether two values are unequal. The function tests whether the @@ -4705,7 +5099,7 @@ declare namespace math { * undefined is unequal with everything except undefined. * @param y Second value to vcompare */ - unequal(y: MathType | string): MathJsChain; + unequal(y: MathType | string): MathJsChain /************************************************************************* * Set functions @@ -4717,7 +5111,7 @@ declare namespace math { * will be sorted in ascending order before the operation. * @param a2 A (multi)set */ - setCartesian(a2: MathCollection): MathJsChain; + setCartesian(a2: MathCollection): MathJsChain /** * Create the difference of two (multi)sets: every element of set1, that @@ -4725,20 +5119,20 @@ declare namespace math { * to single-dimension arrays before the operation * @param a2 A (multi)set */ - setDifference(a2: MathCollection): MathJsChain; + setDifference(a2: MathCollection): MathJsChain /** * Collect the distinct elements of a multiset. A multi-dimension array * will be converted to a single-dimension array before the operation. */ - setDistinct(): MathJsChain; + setDistinct(): MathJsChain /** * Create the intersection of two (multi)sets. Multi-dimension arrays * will be converted to single-dimension arrays before the operation. * @param a2 A (multi)set */ - setIntersect(a2: MathCollection): MathJsChain; + setIntersect(a2: MathCollection): MathJsChain /** * Check whether a (multi)set is a subset of another (multi)set. (Every @@ -4746,7 +5140,7 @@ declare namespace math { * be converted to single-dimension arrays before the operation. * @param a2 A (multi)set */ - setIsSubset(a2: MathCollection): MathJsChain; + setIsSubset(a2: MathCollection): MathJsChain /** * Count the multiplicity of an element in a multiset. A multi-dimension @@ -4754,21 +5148,21 @@ declare namespace math { * operation. * @param a A multiset */ - setMultiplicity(a: MathCollection): MathJsChain; + setMultiplicity(a: MathCollection): MathJsChain /** * Create the powerset of a (multi)set. (The powerset contains very * possible subsets of a (multi)set.) A multi-dimension array will be * converted to a single-dimension array before the operation. */ - setPowerset(): MathJsChain; + setPowerset(): MathJsChain /** * Count the number of elements of a (multi)set. When a second parameter * is ‘true’, count only the unique values. A multi-dimension array will * be converted to a single-dimension array before the operation. */ - setSize(): MathJsChain; + setSize(): MathJsChain /** * Create the symmetric difference of two (multi)sets. Multi-dimension @@ -4776,14 +5170,14 @@ declare namespace math { * operation. * @param a2 A (multi)set */ - setSymDifference(a2: MathCollection): MathJsChain; + setSymDifference(a2: MathCollection): MathJsChain /** * Create the union of two (multi)sets. Multi-dimension arrays will be * converted to single-dimension arrays before the operation. * @param a2 A (multi)set */ - setUnion(a2: MathCollection): MathJsChain; + setUnion(a2: MathCollection): MathJsChain /************************************************************************* * Special functions @@ -4793,7 +5187,7 @@ declare namespace math { * Compute the erf function of a value using a rational Chebyshev * approximations for different intervals of x. */ - erf(): MathJsChain; + erf(): MathJsChain /************************************************************************* * Statistics functions @@ -4804,7 +5198,7 @@ declare namespace math { * values. The median absolute deviation is defined as the median of the * absolute deviations from the median. */ - mad(): MathJsChain; + mad(): MathJsChain /** * Compute the maximum value of a matrix or a list with values. In case @@ -4813,7 +5207,7 @@ declare namespace math { * dimension will be calculated. Parameter dim is zero-based. * @param dim The maximum over the selected dimension */ - max(dim?: number): MathJsChain; + max(dim?: number): MathJsChain /** * Compute the mean value of matrix or a list with values. In case of a @@ -4822,7 +5216,7 @@ declare namespace math { * dimension will be calculated. Parameter dim is zero-based. * @param dim The mean over the selected dimension */ - mean(dim?: number): MathJsChain; + mean(dim?: number): MathJsChain /** * Compute the median of a matrix or a list with values. The values are @@ -4832,7 +5226,7 @@ declare namespace math { * dimensional) array or matrix, the median of all elements will be * calculated. */ - median(): MathJsChain; + median(): MathJsChain /** * Compute the maximum value of a matrix or a list of values. In case of @@ -4841,21 +5235,21 @@ declare namespace math { * dimension will be calculated. Parameter dim is zero-based. * @param dim The minimum over the selected dimension */ - min(dim?: number): MathJsChain; + min(dim?: number): MathJsChain /** * Computes the mode of a set of numbers or a list with values(numbers * or characters). If there are more than one modes, it returns a list * of those values. */ - mode(): MathJsChain; + mode(): MathJsChain /** * Compute the product of a matrix or a list with values. In case of a * (multi dimensional) array or matrix, the sum of all elements will be * calculated. */ - prod(): MathJsChain; + prod(): MathJsChain /** * Compute the prob order quantile of a matrix or a list with values. @@ -4869,7 +5263,10 @@ declare namespace math { * these options can be provided * @param sorted =false is data sorted in ascending order */ - quantileSeq(prob: number | BigNumber | MathArray, sorted?: boolean): MathJsChain; + quantileSeq( + prob: number | BigNumber | MathArray, + sorted?: boolean + ): MathJsChain /** * Compute the standard deviation of a matrix or a list with values. The * standard deviations is defined as the square root of the variance: @@ -4886,7 +5283,10 @@ declare namespace math { * ‘unbiased’. * @returns The standard deviation */ - std(dim?: number, normalization?: 'unbiased' | 'uncorrected' | 'biased'): MathJsChain; + std( + dim?: number, + normalization?: 'unbiased' | 'uncorrected' | 'biased' + ): MathJsChain /** * Compute the standard deviation of a matrix or a list with values. The * standard deviations is defined as the square root of the variance: @@ -4902,14 +5302,14 @@ declare namespace math { * ‘unbiased’. * @returns The standard deviation */ - std(normalization: 'unbiased' | 'uncorrected' | 'biased'): MathJsChain; + std(normalization: 'unbiased' | 'uncorrected' | 'biased'): MathJsChain /** * Compute the sum of a matrix or a list with values. In case of a * (multi dimensional) array or matrix, the sum of all elements will be * calculated. */ - sum(): MathJsChain; + sum(): MathJsChain /** * Compute the variance of a matrix or a list with values. In case of a * (multi dimensional) array or matrix, the variance over all elements @@ -4927,7 +5327,10 @@ declare namespace math { * Default value: ‘unbiased’. * @returns The variance */ - variance(dim?: number, normalization?: 'unbiased' | 'uncorrected' | 'biased'): MathJsChain; + variance( + dim?: number, + normalization?: 'unbiased' | 'uncorrected' | 'biased' + ): MathJsChain /** * Compute the variance of a matrix or a list with values. In case of a * (multi dimensional) array or matrix, the variance over all elements @@ -4944,7 +5347,7 @@ declare namespace math { * Default value: ‘unbiased’. * @returns The variance */ - variance(normalization: 'unbiased' | 'uncorrected' | 'biased'): MathJsChain; + variance(normalization: 'unbiased' | 'uncorrected' | 'biased'): MathJsChain /************************************************************************* * String functions @@ -4961,7 +5364,14 @@ declare namespace math { * string. * @see http://mathjs.org/docs/reference/functions/format.html */ - format(value: any, options?: FormatOptions | number | ((item: any) => string), callback?: (value: any) => string): MathJsChain; + format( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + value: any, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + options?: FormatOptions | number | ((item: any) => string), + // eslint-disable-next-line @typescript-eslint/no-explicit-any + callback?: (value: any) => string + ): MathJsChain /** * Interpolate values into a string template. @@ -4972,7 +5382,12 @@ declare namespace math { * @param options Formatting options, or the number of digits to format * numbers. See function math.format for a description of all options. */ - print(values: any, precision?: number, options?: number | object): MathJsChain; + print( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + values: any, + precision?: number, + options?: number | object + ): MathJsChain /************************************************************************* * Trigonometry functions @@ -4982,161 +5397,161 @@ declare namespace math { * Calculate the inverse cosine of a value. For matrices, the function * is evaluated element wise. */ - acos(): MathJsChain; + acos(): MathJsChain /** * Calculate the hyperbolic arccos of a value, defined as acosh(x) = * ln(sqrt(x^2 - 1) + x). For matrices, the function is evaluated * element wise. */ - acosh(): MathJsChain; + acosh(): MathJsChain /** * Calculate the inverse cotangent of a value. For matrices, the * function is evaluated element wise. */ - acot(): MathJsChain; + acot(): MathJsChain /** * Calculate the hyperbolic arccotangent of a value, defined as acoth(x) * = (ln((x+1)/x) + ln(x/(x-1))) / 2. For matrices, the function is * evaluated element wise. */ - acoth(): MathJsChain; + acoth(): MathJsChain /** * Calculate the inverse cosecant of a value. For matrices, the function * is evaluated element wise. */ - acsc(): MathJsChain; + acsc(): MathJsChain /** * Calculate the hyperbolic arccosecant of a value, defined as acsch(x) * = ln(1/x + sqrt(1/x^2 + 1)). For matrices, the function is evaluated * element wise. */ - acsch(): MathJsChain; + acsch(): MathJsChain /** * Calculate the inverse secant of a value. For matrices, the function * is evaluated element wise. */ - asec(): MathJsChain; + asec(): MathJsChain /** * Calculate the hyperbolic arcsecant of a value, defined as asech(x) = * ln(sqrt(1/x^2 - 1) + 1/x). For matrices, the function is evaluated * element wise. */ - asech(): MathJsChain; + asech(): MathJsChain /** * Calculate the inverse sine of a value. For matrices, the function is * evaluated element wise. */ - asin(): MathJsChain; + asin(): MathJsChain /** * Calculate the hyperbolic arcsine of a value, defined as asinh(x) = * ln(x + sqrt(x^2 + 1)). For matrices, the function is evaluated * element wise. */ - asinh(): MathJsChain; + asinh(): MathJsChain /** * Calculate the inverse tangent of a value. For matrices, the function * is evaluated element wise. */ - atan(): MathJsChain; + atan(): MathJsChain /** * Calculate the inverse tangent function with two arguments, y/x. By * providing two arguments, the right quadrant of the computed angle can * be determined. For matrices, the function is evaluated element wise. */ - atan2(): MathJsChain; + atan2(): MathJsChain /** * Calculate the hyperbolic arctangent of a value, defined as atanh(x) = * ln((1 + x)/(1 - x)) / 2. For matrices, the function is evaluated * element wise. */ - atanh(): MathJsChain; + atanh(): MathJsChain /** * Calculate the cosine of a value. For matrices, the function is * evaluated element wise. */ - cos(): MathJsChain; + cos(): MathJsChain /** * Calculate the hyperbolic cosine of a value, defined as cosh(x) = 1/2 * * (exp(x) + exp(-x)). For matrices, the function is evaluated element * wise. */ - cosh(): MathJsChain; + cosh(): MathJsChain /** * Calculate the cotangent of a value. cot(x) is defined as 1 / tan(x). * For matrices, the function is evaluated element wise. */ - cot(): MathJsChain; + cot(): MathJsChain /** * Calculate the hyperbolic cotangent of a value, defined as coth(x) = 1 * / tanh(x). For matrices, the function is evaluated element wise. */ - coth(): MathJsChain; + coth(): MathJsChain /** * Calculate the cosecant of a value, defined as csc(x) = 1/sin(x). For * matrices, the function is evaluated element wise. */ - csc(): MathJsChain; + csc(): MathJsChain /** * Calculate the hyperbolic cosecant of a value, defined as csch(x) = 1 * / sinh(x). For matrices, the function is evaluated element wise. */ - csch(): MathJsChain; + csch(): MathJsChain /** * Calculate the secant of a value, defined as sec(x) = 1/cos(x). For * matrices, the function is evaluated element wise. */ - sec(): MathJsChain; + sec(): MathJsChain /** * Calculate the hyperbolic secant of a value, defined as sech(x) = 1 / * cosh(x). For matrices, the function is evaluated element wise. */ - sech(): MathJsChain; + sech(): MathJsChain /** * Calculate the sine of a value. For matrices, the function is * evaluated element wise. */ - sin(): MathJsChain; + sin(): MathJsChain /** * Calculate the hyperbolic sine of a value, defined as sinh(x) = 1/2 * * (exp(x) - exp(-x)). For matrices, the function is evaluated element * wise. */ - sinh(): MathJsChain; + sinh(): MathJsChain /** * Calculate the tangent of a value. tan(x) is equal to sin(x) / cos(x). * For matrices, the function is evaluated element wise. */ - tan(): MathJsChain; + tan(): MathJsChain /** * Calculate the hyperbolic tangent of a value, defined as tanh(x) = * (exp(2 * x) - 1) / (exp(2 * x) + 1). For matrices, the function is * evaluated element wise. */ - tanh(): MathJsChain; + tanh(): MathJsChain /************************************************************************* * Unit functions @@ -5148,7 +5563,7 @@ declare namespace math { * @param unit New unit. Can be a string like "cm" or a unit without * value. */ - to(unit: Unit | string): MathJsChain; + to(unit: Unit | string): MathJsChain /************************************************************************* * Utils functions @@ -5157,70 +5572,70 @@ declare namespace math { /** * Clone an object. */ - clone(): MathJsChain; + clone(): MathJsChain /** * Test whether a value is an integer number. The function supports * number, BigNumber, and Fraction. The function is evaluated * element-wise in case of Array or Matrix input. */ - isInteger(): MathJsChain; + isInteger(): MathJsChain /** * Test whether a value is NaN (not a number). The function supports * types number, BigNumber, Fraction, Unit and Complex. The function is * evaluated element-wise in case of Array or Matrix input. */ - isNaN(): MathJsChain; + isNaN(): MathJsChain /** * Test whether a value is negative: smaller than zero. The function * supports types number, BigNumber, Fraction, and Unit. The function is * evaluated element-wise in case of Array or Matrix input. */ - isNegative(): MathJsChain; + isNegative(): MathJsChain /** * Test whether a value is an numeric value. The function is evaluated * element-wise in case of Array or Matrix input. */ - isNumeric(): MathJsChain; + isNumeric(): MathJsChain /** * Test whether a value is positive: larger than zero. The function * supports types number, BigNumber, Fraction, and Unit. The function is * evaluated element-wise in case of Array or Matrix input. */ - isPositive(): MathJsChain; + isPositive(): MathJsChain /** * Test whether a value is prime: has no divisors other than itself and * one. The function supports type number, bignumber. The function is * evaluated element-wise in case of Array or Matrix input. */ - isPrime(): MathJsChain; + isPrime(): MathJsChain /** * Test whether a value is zero. The function can check for zero for * types number, BigNumber, Fraction, Complex, and Unit. The function is * evaluated element-wise in case of Array or Matrix input. */ - isZero(): MathJsChain; + isZero(): MathJsChain /** * Determine the type of a variable. */ - typeOf(): MathJsChain; + typeOf(): MathJsChain } interface ImportOptions { - override?: boolean; - silent?: boolean; - wrap?: boolean; + override?: boolean + silent?: boolean + wrap?: boolean } interface ImportObject { - [key: string]: any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [key: string]: any } - } diff --git a/types/index.ts b/types/index.ts index 46a434dcd..22b420eb9 100644 --- a/types/index.ts +++ b/types/index.ts @@ -7,8 +7,8 @@ import { addDependencies, divideDependencies, formatDependencies, -} from 'mathjs'; -import * as assert from 'assert'; +} from 'mathjs' +import * as assert from 'assert' import { expectTypeOf } from 'expect-type' // This file serves a dual purpose: @@ -19,57 +19,73 @@ import { expectTypeOf } from 'expect-type' Basic usage examples */ { - const math = create(all); + const math = create(all) + + const m2by2 = [ + [-1, 2], + [3, 1], + ] + const m2by3 = [ + [1, 2, 3], + [4, 5, 6], + ] // functions and constants - math.round(math.e, 3); - math.round(100.123, 3); - math.atan2(3, -3) / math.pi; - math.log(10000, 10); - math.sqrt(-4); - math.pow([[-1, 2], [3, 1]], 2); - const angle = 0.2; - math.add(math.pow(math.sin(angle), 2), math.pow(math.cos(angle), 2)); + math.round(math.e, 3) + math.round(100.123, 3) + math.atan2(3, -3) / math.pi + math.log(10000, 10) + math.sqrt(-4) + + math.pow(m2by2, 2) + const angle = 0.2 + math.add(math.pow(math.sin(angle), 2), math.pow(math.cos(angle), 2)) // std and variance check + math.std(1, 2, 3) math.std([1, 2, 3]) - math.std([1, 2, 3], "biased") - math.std([1,2, 3], 0, "biased") - math.std([[1,2,3], [4,5,6]], 1, "unbiased") - math.std([[1,2,3], [4,5,6]], 1, "uncorrected") + math.std([1, 2, 3], 'biased') + math.std([1, 2, 3], 0, 'biased') + math.std(m2by3, 1, 'unbiased') + math.std(m2by3, 1, 'uncorrected') math.variance(1, 2, 3) math.variance([1, 2, 3]) - math.variance([1, 2, 3], "biased") - math.variance([1,2, 3], 0, "biased") - math.variance([[1,2,3], [4,5,6]], 1, "unbiased") - math.variance([[1,2,3], [4,5,6]], 1, "uncorrected") + math.variance([1, 2, 3], 'biased') + math.variance([1, 2, 3], 0, 'biased') + math.variance(m2by3, 1, 'unbiased') + math.variance(m2by3, 1, 'uncorrected') // std and variance on chain - math.chain([1, 2, 3]).std("unbiased") - math.chain([[1, 2, 3], [4, 5, 6]]).std(0, "biased").std(0, "uncorrected") - math.chain([[1, 2, 3], [4, 5, 6]]).std(0, "biased").std(0, "uncorrected") - math.chain([1, 2, 3]).std("unbiased") - math.chain([[1, 2, 3], [4, 5, 6]]).variance(0, "biased") - math.chain([[1, 2, 3], [4, 5, 6]]).variance(1, "uncorrected").variance("unbiased") - + math.chain([1, 2, 3]).std('unbiased') + math.chain(m2by3).std(0, 'biased').std(0, 'uncorrected') + math.chain(m2by3).std(0, 'biased').std(0, 'uncorrected') + math.chain([1, 2, 3]).std('unbiased') + math.chain(m2by3).variance(0, 'biased') + math.chain(m2by3).variance(1, 'uncorrected').variance('unbiased') // expressions - math.evaluate('1.2 * (2 + 4.5)'); + math.evaluate('1.2 * (2 + 4.5)') // chained operations - const a = math.chain(3).add(4).multiply(2).done(); - assert.strictEqual(a, 14); + const a = math.chain(3).add(4).multiply(2).done() + assert.strictEqual(a, 14) // mixed use of different data types in functions - assert.deepStrictEqual(math.add(4, [5, 6]), [9, 10]); // number + Array - assert.deepStrictEqual(math.multiply(math.unit('5 mm'), 3), math.unit('15 mm')); // Unit * number - assert.deepStrictEqual(math.subtract([2, 3, 4], 5), [-3, -2, -1]); // Array - number - assert.deepStrictEqual(math.add(math.matrix([2, 3]), [4, 5]), math.matrix([6, 8])); // Matrix + Array + assert.deepStrictEqual(math.add(4, [5, 6]), [9, 10]) // number + Array + assert.deepStrictEqual( + math.multiply(math.unit('5 mm'), 3), + math.unit('15 mm') + ) // Unit * number + assert.deepStrictEqual(math.subtract([2, 3, 4], 5), [-3, -2, -1]) // Array - number + assert.deepStrictEqual( + math.add(math.matrix([2, 3]), [4, 5]), + math.matrix([6, 8]) + ) // Matrix + Array // narrowed type inference - const b: math.Matrix = math.add(math.matrix([2]), math.matrix([3])); - const c: math.Matrix = math.subtract(math.matrix([4]), math.matrix([5])); + const _b: math.Matrix = math.add(math.matrix([2]), math.matrix([3])) + const _c: math.Matrix = math.subtract(math.matrix([4]), math.matrix([5])) } /* @@ -80,11 +96,17 @@ Bignumbers examples const math = create(all, { number: 'BigNumber', precision: 20, - }); + }) { - assert.deepStrictEqual(math.add(math.bignumber(0.1), math.bignumber(0.2)), math.bignumber(0.3)); - assert.deepStrictEqual(math.divide(math.bignumber(0.3), math.bignumber(0.2)), math.bignumber(1.5)); + assert.deepStrictEqual( + math.add(math.bignumber(0.1), math.bignumber(0.2)), + math.bignumber(0.3) + ) + assert.deepStrictEqual( + math.divide(math.bignumber(0.3), math.bignumber(0.2)), + math.bignumber(1.5) + ) } } @@ -92,29 +114,29 @@ Bignumbers examples Chaining examples */ { - const math = create(all, {}); - const a = math.chain(3).add(4).multiply(2).done(); - assert.strictEqual(a, 14); + const math = create(all, {}) + const a = math.chain(3).add(4).multiply(2).done() + assert.strictEqual(a, 14) // Another example, calculate square(sin(pi / 4)) - const b = math.chain(math.pi).divide(4).sin().square().done(); + const _b = math.chain(math.pi).divide(4).sin().square().done() // toString will return a string representation of the chain's value - const chain = math.chain(2).divide(3); - const str: string = chain.toString(); - assert.strictEqual(str, "0.6666666666666666"); + const chain = math.chain(2).divide(3) + const str: string = chain.toString() + assert.strictEqual(str, '0.6666666666666666') - chain.valueOf(); + chain.valueOf() // the function subset can be used to get or replace sub matrices const array = [ [1, 2], [3, 4], - ]; - const v = math.chain(array).subset(math.index(1, 0)).done(); - assert.strictEqual(v, 3); + ] + const v = math.chain(array).subset(math.index(1, 0)).done() + assert.strictEqual(v, 3) - const m = math.chain(array).subset(math.index(0, 0), 8).multiply(3).done(); + const _m = math.chain(array).subset(math.index(0, 0), 8).multiply(3).done() // filtering assert.deepStrictEqual( @@ -125,67 +147,67 @@ Chaining examples .filter((n) => n !== 1000) .done(), [2, 3] - ); + ) - const r = math.chain(-0.483).round([0,1,2]).floor().add(0.52).fix(1).done(); - assert.deepStrictEqual(r, [0.5, -0.4, -0.4]); + const r = math.chain(-0.483).round([0, 1, 2]).floor().add(0.52).fix(1).done() + assert.deepStrictEqual(r, [0.5, -0.4, -0.4]) } /* Simplify examples */ { - const math = create(all); + const math = create(all) - math.simplify("2 * 1 * x ^ (2 - 1)"); - math.simplify("2 * 3 * x", { x: 4 }); + math.simplify('2 * 1 * x ^ (2 - 1)') + math.simplify('2 * 3 * x', { x: 4 }) - const f = math.parse("2 * 1 * x ^ (2 - 1)"); - math.simplify(f); + const f = math.parse('2 * 1 * x ^ (2 - 1)') + math.simplify(f) - math.simplify("0.4 * x", {}, { exactFractions: true }); - math.simplify("0.4 * x", {}, { exactFractions: false }); + math.simplify('0.4 * x', {}, { exactFractions: true }) + math.simplify('0.4 * x', {}, { exactFractions: false }) } /* Complex numbers examples */ { - const math = create(all, {}); - const a = math.complex(2, 3); + const math = create(all, {}) + const a = math.complex(2, 3) // create a complex number by providing a string with real and complex parts - const b = math.complex('3 - 7i'); + const b = math.complex('3 - 7i') // read the real and complex parts of the complex number { - const x: number = a.re; - const y: number = a.im; + const _x: number = a.re + const _y: number = a.im // adjust the complex value - a.re = 5; + a.re = 5 } // clone a complex value { - const clone = a.clone(); + const _clone = a.clone() } // perform operations with complex numbers { - math.add(a, b); - math.multiply(a, b); - math.sin(a); + math.add(a, b) + math.multiply(a, b) + math.sin(a) } // create a complex number from polar coordinates { - const p: math.PolarCoordinates = { r: math.sqrt(2), phi: math.pi / 4 }; - const c: math.Complex = math.complex(p); + const p: math.PolarCoordinates = { r: math.sqrt(2), phi: math.pi / 4 } + const _c: math.Complex = math.complex(p) } // get polar coordinates of a complex number { - const p: math.PolarCoordinates = math.complex(3, 4).toPolar(); + const _p: math.PolarCoordinates = math.complex(3, 4).toPolar() } } @@ -193,78 +215,79 @@ Complex numbers examples Expressions examples */ { - const math = create(all, {}); + const math = create(all, {}) // evaluate expressions { - math.evaluate('sqrt(3^2 + 4^2)'); + math.evaluate('sqrt(3^2 + 4^2)') } // evaluate multiple expressions at once { - math.evaluate(['f = 3', 'g = 4', 'f * g']); + math.evaluate(['f = 3', 'g = 4', 'f * g']) } // get content of a parenthesis node { - const node = math.parse('(1)'); + const node = math.parse('(1)') if (node.type !== 'ParenthesisNode') { - throw Error(`expected ParenthesisNode, got ${node.type}`); + throw Error(`expected ParenthesisNode, got ${node.type}`) } - const innerNode = node.content; + const _innerNode = node.content } // scope can contain both variables and functions { - const scope = { hello: (name: string) => `hello, ${name}!` }; - assert.strictEqual(math.evaluate('hello("hero")', scope), "hello, hero!"); + const scope = { hello: (name: string) => `hello, ${name}!` } + assert.strictEqual(math.evaluate('hello("hero")', scope), 'hello, hero!') } // define a function as an expression { + // eslint-disable-next-line @typescript-eslint/no-explicit-any const scope: any = { a: 3, b: 4, - }; - const f = math.evaluate('f(x) = x ^ a', scope); - f(2); - scope.f(2); + } + const f = math.evaluate('f(x) = x ^ a', scope) + f(2) + scope.f(2) } { - const node2 = math.parse('x^a'); - const code2: math.EvalFunction = node2.compile(); - node2.toString(); + const node2 = math.parse('x^a') + const _code2: math.EvalFunction = node2.compile() + node2.toString() } // 3. using function math.compile // parse an expression { // provide a scope for the variable assignment - const code2 = math.compile('a = a + 3'); - const scope = { a: 7 }; - code2.evaluate(scope); + const code2 = math.compile('a = a + 3') + const scope = { a: 7 } + code2.evaluate(scope) } // 4. using a parser - const parser = math.parser(); + const parser = math.parser() // get and set variables and functions { - assert.strictEqual(parser.evaluate('x = 7 / 2'), 3.5); - assert.strictEqual(parser.evaluate('x + 3'), 6.5); - parser.evaluate('f(x, y) = x^y'); // f(x, y) - assert.strictEqual(parser.evaluate('f(2, 3)'), 8); + assert.strictEqual(parser.evaluate('x = 7 / 2'), 3.5) + assert.strictEqual(parser.evaluate('x + 3'), 6.5) + parser.evaluate('f(x, y) = x^y') // f(x, y) + assert.strictEqual(parser.evaluate('f(2, 3)'), 8) - const x = parser.get('x'); - const f = parser.get('f'); - const y = parser.getAll(); - const g = f(3, 3); + const _x = parser.get('x') + const f = parser.get('f') + const _y = parser.getAll() + const _g = f(3, 3) - parser.set('h', 500); - parser.set('hello', (name: string) => `hello, ${name}!`); + parser.set('h', 500) + parser.set('hello', (name: string) => `hello, ${name}!`) } // clear defined functions and variables - parser.clear(); + parser.clear() } /* @@ -274,114 +297,122 @@ Fractions examples // configure the default type of numbers as Fractions const math = create(all, { number: 'Fraction', - }); + }) - const x = math.fraction(0.125); - const y = math.fraction('1/3'); - math.fraction(2, 3); + const x = math.fraction(0.125) + const y = math.fraction('1/3') + math.fraction(2, 3) - math.add(x, y); - math.divide(x, y); + math.add(x, y) + math.divide(x, y) // output formatting - const a = math.fraction('2/3'); + const _a = math.fraction('2/3') } /* Matrices examples */ { - const math = create(all, {}); + const math = create(all, {}) // create matrices and arrays. a matrix is just a wrapper around an Array, // providing some handy utilities. - const a: math.Matrix = math.matrix([1, 4, 9, 16, 25]); - const b: math.Matrix = math.matrix(math.ones([2, 3])); - b.size(); + const a: math.Matrix = math.matrix([1, 4, 9, 16, 25]) + const b: math.Matrix = math.matrix(math.ones([2, 3])) + b.size() // the Array data of a Matrix can be retrieved using valueOf() - const array = a.valueOf(); + const _array = a.valueOf() // Matrices can be cloned - const clone: math.Matrix = a.clone(); + const _clone: math.Matrix = a.clone() // perform operations with matrices - math.sqrt(a); - math.factorial(a); + math.sqrt(a) + math.factorial(a) // create and manipulate matrices. Arrays and Matrices can be used mixed. { const a = [ [1, 2], [3, 4], - ]; + ] const b: math.Matrix = math.matrix([ [5, 6], [1, 1], - ]); + ]) - b.subset(math.index(1, [0, 1]), [[7, 8]]); - const c = math.multiply(a, b); - const f: math.Matrix = math.matrix([1, 0]); - const d: math.Matrix = f.subset(math.index(1)); + b.subset(math.index(1, [0, 1]), [[7, 8]]) + const _c = math.multiply(a, b) + const f: math.Matrix = math.matrix([1, 0]) + const _d: math.Matrix = f.subset(math.index(1)) } // get a sub matrix { - const a: math.Matrix = math.diag(math.range(1, 4)); - a.subset(math.index([1, 2], [1, 2])); - const b: math.Matrix = math.range(1, 6); - b.subset(math.index(math.range(1, 4))); + const a: math.Matrix = math.diag(math.range(1, 4)) + a.subset(math.index([1, 2], [1, 2])) + const b: math.Matrix = math.range(1, 6) + b.subset(math.index(math.range(1, 4))) } // resize a multi dimensional matrix { - const a = math.matrix(); - a.resize([2, 2, 2], 0); - a.size(); - a.resize([2, 2]); - a.size(); + const a = math.matrix() + a.resize([2, 2, 2], 0) + a.size() + a.resize([2, 2]) + a.size() } // can set a subset of a matrix to uninitialized { - const m = math.matrix(); - m.subset(math.index(2), 6, math.uninitialized); + const m = math.matrix() + m.subset(math.index(2), 6, math.uninitialized) } // create ranges { - math.range(1, 6); - math.range(0, 18, 3); - math.range('2:-1:-3'); - math.factorial(math.range('1:6')); + math.range(1, 6) + math.range(0, 18, 3) + math.range('2:-1:-3') + math.factorial(math.range('1:6')) } // map matrix { assert.deepStrictEqual( math.map([1, 2, 3], function (value) { - return value * value; + return value * value }), [1, 4, 9] - ); + ) } // filter matrix { assert.deepStrictEqual( math.filter([6, -2, -1, 4, 3], function (x) { - return x > 0; + return x > 0 }), [6, 4, 3] ) - assert.deepStrictEqual(math.filter(['23', 'foo', '100', '55', 'bar'], /[0-9]+/), ["23", "100", "55"]); + assert.deepStrictEqual( + math.filter(['23', 'foo', '100', '55', 'bar'], /[0-9]+/), + ['23', '100', '55'] + ) } // concat matrix { - assert.deepStrictEqual(math.concat([[0, 1, 2]], [[1, 2, 3]]), [[ 0, 1, 2, 1, 2, 3 ]]); - assert.deepStrictEqual(math.concat([[0, 1, 2]], [[1, 2, 3]], 0), [[ 0, 1, 2 ], [ 1, 2, 3 ]]); + assert.deepStrictEqual(math.concat([[0, 1, 2]], [[1, 2, 3]]), [ + [0, 1, 2, 1, 2, 3], + ]) + assert.deepStrictEqual(math.concat([[0, 1, 2]], [[1, 2, 3]], 0), [ + [0, 1, 2], + [1, 2, 3], + ]) } // Matrix is available as a constructor for instanceof checks @@ -394,39 +425,50 @@ Matrices examples Sparse matrices examples */ { - const math = create(all, {}); + const math = create(all, {}) // create a sparse matrix - const a = math.identity(1000, 1000, 'sparse'); + const a = math.identity(1000, 1000, 'sparse') // do operations with a sparse matrix - const b = math.multiply(a, a); - const c = math.multiply(b, math.complex(2, 2)); - const d = math.matrix([0, 1]); - const e = math.transpose(d); - const f = math.multiply(e, d); + const b = math.multiply(a, a) + const _c = math.multiply(b, math.complex(2, 2)) + const d = math.matrix([0, 1]) + const e = math.transpose(d) + const _f = math.multiply(e, d) } /* Units examples */ { - const math = create(all, {}); + const math = create(all, {}) // units can be created by providing a value and unit name, or by providing // a string with a valued unit. - const a = math.unit(45, 'cm'); // 450 mm - const b = math.unit('0.1m'); // 100 mm - const c = math.unit(b) + const a = math.unit(45, 'cm') // 450 mm + const b = math.unit('0.1m') // 100 mm + const _c = math.unit(b) // creating units - math.createUnit('foo'); - math.createUnit('furlong', '220 yards'); - math.createUnit('furlong', '220 yards', { override: true }); - math.createUnit('testunit', { definition: '0.555556 kelvin', offset: 459.67 }); - math.createUnit('testunit', { definition: '0.555556 kelvin', offset: 459.67 }, { override: true }); - math.createUnit('knot', { definition: '0.514444 m/s', aliases: ['knots', 'kt', 'kts'] }); - math.createUnit('knot', { definition: '0.514444 m/s', aliases: ['knots', 'kt', 'kts'] }, { override: true }); + math.createUnit('foo') + math.createUnit('furlong', '220 yards') + math.createUnit('furlong', '220 yards', { override: true }) + math.createUnit('testunit', { definition: '0.555556 kelvin', offset: 459.67 }) + math.createUnit( + 'testunit', + { definition: '0.555556 kelvin', offset: 459.67 }, + { override: true } + ) + math.createUnit('knot', { + definition: '0.514444 m/s', + aliases: ['knots', 'kt', 'kts'], + }) + math.createUnit( + 'knot', + { definition: '0.514444 m/s', aliases: ['knots', 'kt', 'kts'] }, + { override: true } + ) math.createUnit( 'knot', { @@ -435,7 +477,7 @@ Units examples prefixes: 'long', }, { override: true } - ); + ) math.createUnit( { foo2: { @@ -450,282 +492,381 @@ Units examples { override: true, } - ); + ) // use Unit as definition - math.createUnit('c', { definition: b }); - math.createUnit('c', { definition: b }, { override: true }); + math.createUnit('c', { definition: b }) + math.createUnit('c', { definition: b }, { override: true }) // units can be added, subtracted, and multiplied or divided by numbers and by other units - math.add(a, b); - math.multiply(b, 2); - math.divide(math.unit('1 m'), math.unit('1 s')); - math.pow(math.unit('12 in'), 3); + math.add(a, b) + math.multiply(b, 2) + math.divide(math.unit('1 m'), math.unit('1 s')) + math.pow(math.unit('12 in'), 3) // units can be converted to a specific type, or to a number - b.to('cm'); - math.to(b, 'inch'); - b.toNumber('cm'); - math.number(b, 'cm'); + b.to('cm') + math.to(b, 'inch') + b.toNumber('cm') + math.number(b, 'cm') // the expression parser supports units too - math.evaluate('2 inch to cm'); + math.evaluate('2 inch to cm') // units can be converted to SI - math.unit('1 inch').toSI(); + math.unit('1 inch').toSI() // units can be split into other units - math.unit('1 m').splitUnit(['ft', 'in']); + math.unit('1 m').splitUnit(['ft', 'in']) } /* Expression tree examples */ { - const math = create(all, {}); + const math = create(all, {}) // Filter an expression tree - const node: math.MathNode = math.parse('x^2 + x/4 + 3*y'); - const filtered: math.MathNode[] = node.filter((node: math.MathNode) => node.type === 'SymbolNode' && node.name === 'x'); + const node: math.MathNode = math.parse('x^2 + x/4 + 3*y') + const filtered: math.MathNode[] = node.filter( + (node: math.MathNode) => node.type === 'SymbolNode' && node.name === 'x' + ) - const arr: string[] = filtered.map((node: math.MathNode) => node.toString()); + const _arr: string[] = filtered.map((node: math.MathNode) => node.toString()) // Traverse an expression tree - const node1: math.MathNode = math.parse('3 * x + 2'); - node1.traverse((node: math.MathNode, path: string, parent: math.MathNode) => { - switch (node.type) { - case 'OperatorNode': - return node.type === 'OperatorNode'; - case 'ConstantNode': - return node.type === 'ConstantNode'; - case 'SymbolNode': - return node.type === 'SymbolNode'; - default: - return; + const node1: math.MathNode = math.parse('3 * x + 2') + node1.traverse( + (node: math.MathNode, _path: string, _parent: math.MathNode) => { + switch (node.type) { + case 'OperatorNode': + return node.type === 'OperatorNode' + case 'ConstantNode': + return node.type === 'ConstantNode' + case 'SymbolNode': + return node.type === 'SymbolNode' + default: + return + } } - }); + ) } /* Function ceil examples */ { - const math = create(all, {}); + const math = create(all, {}) // number input - assert.strictEqual(math.ceil(3.2), 4); - assert.strictEqual(math.ceil(-4.2), -4); + assert.strictEqual(math.ceil(3.2), 4) + assert.strictEqual(math.ceil(-4.2), -4) // number input // roundoff result to 2 decimals - assert.strictEqual(math.ceil(3.212, 2), 3.22); - assert.deepStrictEqual(math.ceil(3.212, math.bignumber(2)), math.bignumber(3.22)); - assert.strictEqual(math.ceil(-4.212, 2), -4.21); + assert.strictEqual(math.ceil(3.212, 2), 3.22) + assert.deepStrictEqual( + math.ceil(3.212, math.bignumber(2)), + math.bignumber(3.22) + ) + assert.strictEqual(math.ceil(-4.212, 2), -4.21) // bignumber input assert.deepStrictEqual(math.ceil(math.bignumber(3.212)), math.bignumber(4)) - assert.deepStrictEqual(math.ceil(math.bignumber(3.212), 2), math.bignumber(3.22)) - assert.deepStrictEqual(math.ceil(math.bignumber(3.212), math.bignumber(2)), math.bignumber(3.22)) + assert.deepStrictEqual( + math.ceil(math.bignumber(3.212), 2), + math.bignumber(3.22) + ) + assert.deepStrictEqual( + math.ceil(math.bignumber(3.212), math.bignumber(2)), + math.bignumber(3.22) + ) // fraction input - assert.deepStrictEqual(math.ceil(math.fraction(44,7)), math.fraction(7)) - assert.deepStrictEqual(math.ceil(math.fraction(-44,7)), math.fraction(-6)) - assert.deepStrictEqual(math.ceil(math.fraction(44,7), 2), math.fraction(629,100)) - assert.deepStrictEqual(math.ceil(math.fraction(44,7), math.bignumber(2)), math.fraction(629,100)) + assert.deepStrictEqual(math.ceil(math.fraction(44, 7)), math.fraction(7)) + assert.deepStrictEqual(math.ceil(math.fraction(-44, 7)), math.fraction(-6)) + assert.deepStrictEqual( + math.ceil(math.fraction(44, 7), 2), + math.fraction(629, 100) + ) + assert.deepStrictEqual( + math.ceil(math.fraction(44, 7), math.bignumber(2)), + math.fraction(629, 100) + ) // Complex input - const c = math.complex(3.24, -2.71); - assert.deepStrictEqual(math.ceil(c), math.complex(4, -2)); - assert.deepStrictEqual(math.ceil(c, 1), math.complex(3.3, -2.7)); - assert.deepStrictEqual(math.ceil(c, math.bignumber(1)), math.complex(3.3, -2.7)); + const c = math.complex(3.24, -2.71) + assert.deepStrictEqual(math.ceil(c), math.complex(4, -2)) + assert.deepStrictEqual(math.ceil(c, 1), math.complex(3.3, -2.7)) + assert.deepStrictEqual( + math.ceil(c, math.bignumber(1)), + math.complex(3.3, -2.7) + ) // array input - assert.deepStrictEqual(math.ceil([3.2, 3.8, -4.7]), [4, 4, -4]); - assert.deepStrictEqual(math.ceil([3.21, 3.82, -4.71], 1), [3.3, 3.9, -4.7]); - assert.deepStrictEqual(math.ceil([3.21, 3.82, -4.71], math.bignumber(1)), - math.bignumber([3.3, 3.9, -4.7])); + assert.deepStrictEqual(math.ceil([3.2, 3.8, -4.7]), [4, 4, -4]) + assert.deepStrictEqual(math.ceil([3.21, 3.82, -4.71], 1), [3.3, 3.9, -4.7]) + assert.deepStrictEqual( + math.ceil([3.21, 3.82, -4.71], math.bignumber(1)), + math.bignumber([3.3, 3.9, -4.7]) + ) // numeric input, array or matrix of decimals - let numCeiled: math.MathArray = math.ceil(math.tau, [2, 3]) - assert.deepStrictEqual(numCeiled, [6.29, 6.284]); - let bigCeiled: math.Matrix = math.ceil(math.bignumber(6.28318), math.matrix([2, 3])); - assert.deepStrictEqual(bigCeiled, math.matrix(math.bignumber([6.29, 6.284]))); - assert.deepStrictEqual(math.ceil(math.fraction(44, 7), [2, 3]), - [math.fraction(629, 100), math.fraction(6286, 1000)]); + const numCeiled: math.MathArray = math.ceil(math.tau, [2, 3]) + assert.deepStrictEqual(numCeiled, [6.29, 6.284]) + const bigCeiled: math.Matrix = math.ceil( + math.bignumber(6.28318), + math.matrix([2, 3]) + ) + assert.deepStrictEqual(bigCeiled, math.matrix(math.bignumber([6.29, 6.284]))) + assert.deepStrictEqual(math.ceil(math.fraction(44, 7), [2, 3]), [ + math.fraction(629, 100), + math.fraction(6286, 1000), + ]) - // array - array is (currently) undefined - //@ts-expect-error - assert.throws(() => math.ceil([3.21, 3.82], [1, 2]), TypeError); + // @ts-expect-error ... verify ceil(array, array) throws an error (for now) + assert.throws(() => math.ceil([3.21, 3.82], [1, 2]), TypeError) } /* Function fix examples */ { - const math = create(all, {}); + const math = create(all, {}) // number input - assert.strictEqual(math.fix(3.2), 3); - assert.strictEqual(math.fix(-4.2), -4); + assert.strictEqual(math.fix(3.2), 3) + assert.strictEqual(math.fix(-4.2), -4) // number input // roundoff result to 2 decimals - assert.strictEqual(math.fix(3.212, 2), 3.21); - assert.deepStrictEqual(math.fix(3.212, math.bignumber(2)), math.bignumber(3.21)); - assert.strictEqual(math.fix(-4.212, 2), -4.21); + assert.strictEqual(math.fix(3.212, 2), 3.21) + assert.deepStrictEqual( + math.fix(3.212, math.bignumber(2)), + math.bignumber(3.21) + ) + assert.strictEqual(math.fix(-4.212, 2), -4.21) // bignumber input assert.deepStrictEqual(math.fix(math.bignumber(3.212)), math.bignumber(3)) - assert.deepStrictEqual(math.fix(math.bignumber(3.212), 2), math.bignumber(3.21)) - assert.deepStrictEqual(math.fix(math.bignumber(3.212), math.bignumber(2)), math.bignumber(3.21)) + assert.deepStrictEqual( + math.fix(math.bignumber(3.212), 2), + math.bignumber(3.21) + ) + assert.deepStrictEqual( + math.fix(math.bignumber(3.212), math.bignumber(2)), + math.bignumber(3.21) + ) // fraction input - assert.deepStrictEqual(math.fix(math.fraction(44,7)), math.fraction(6)) - assert.deepStrictEqual(math.fix(math.fraction(-44,7)), math.fraction(-6)) - assert.deepStrictEqual(math.fix(math.fraction(44,7), 2), math.fraction(628,100)) - assert.deepStrictEqual(math.fix(math.fraction(44,7), math.bignumber(2)), math.fraction(628,100)) + assert.deepStrictEqual(math.fix(math.fraction(44, 7)), math.fraction(6)) + assert.deepStrictEqual(math.fix(math.fraction(-44, 7)), math.fraction(-6)) + assert.deepStrictEqual( + math.fix(math.fraction(44, 7), 2), + math.fraction(628, 100) + ) + assert.deepStrictEqual( + math.fix(math.fraction(44, 7), math.bignumber(2)), + math.fraction(628, 100) + ) // Complex input - const c = math.complex(3.24, -2.71); - assert.deepStrictEqual(math.fix(c), math.complex(3, -2)); - assert.deepStrictEqual(math.fix(c, 1), math.complex(3.2, -2.7)); - assert.deepStrictEqual(math.fix(c, math.bignumber(1)), math.complex(3.2, -2.7)); + const c = math.complex(3.24, -2.71) + assert.deepStrictEqual(math.fix(c), math.complex(3, -2)) + assert.deepStrictEqual(math.fix(c, 1), math.complex(3.2, -2.7)) + assert.deepStrictEqual( + math.fix(c, math.bignumber(1)), + math.complex(3.2, -2.7) + ) // array input - assert.deepStrictEqual(math.fix([3.2, 3.8, -4.7]), [3, 3, -4]); - assert.deepStrictEqual(math.fix([3.21, 3.82, -4.71], 1), [3.2, 3.8, -4.7]); - assert.deepStrictEqual(math.fix([3.21, 3.82, -4.71], math.bignumber(1)), - math.bignumber([3.2, 3.8, -4.7])); + assert.deepStrictEqual(math.fix([3.2, 3.8, -4.7]), [3, 3, -4]) + assert.deepStrictEqual(math.fix([3.21, 3.82, -4.71], 1), [3.2, 3.8, -4.7]) + assert.deepStrictEqual( + math.fix([3.21, 3.82, -4.71], math.bignumber(1)), + math.bignumber([3.2, 3.8, -4.7]) + ) // numeric input, array or matrix of decimals - let numFixed: math.MathArray = math.fix(math.tau, [2, 3]) - assert.deepStrictEqual(numFixed, [6.28, 6.283]); - let bigFixed: math.Matrix = math.fix(math.bignumber(6.28318), math.matrix([2, 3])); - assert.deepStrictEqual(bigFixed, math.matrix(math.bignumber([6.28, 6.283]))); - assert.deepStrictEqual(math.fix(math.fraction(44, 7), [2, 3]), - [math.fraction(628, 100), math.fraction(6285, 1000)]); + const numFixed: math.MathArray = math.fix(math.tau, [2, 3]) + assert.deepStrictEqual(numFixed, [6.28, 6.283]) + const bigFixed: math.Matrix = math.fix( + math.bignumber(6.28318), + math.matrix([2, 3]) + ) + assert.deepStrictEqual(bigFixed, math.matrix(math.bignumber([6.28, 6.283]))) + assert.deepStrictEqual(math.fix(math.fraction(44, 7), [2, 3]), [ + math.fraction(628, 100), + math.fraction(6285, 1000), + ]) - // array - array is (currently) undefined - //@ts-expect-error - assert.throws(() => math.fix([3.21, 3.82], [1, 2]), TypeError); + // @ts-expect-error ... verify fix(array, array) throws an error (for now) + assert.throws(() => math.fix([3.21, 3.82], [1, 2]), TypeError) } /* Function floor examples */ { - const math = create(all, {}); + const math = create(all, {}) // number input - assert.strictEqual(math.floor(3.2), 3); - assert.strictEqual(math.floor(-4.2), -5); + assert.strictEqual(math.floor(3.2), 3) + assert.strictEqual(math.floor(-4.2), -5) // number input // roundoff result to 2 decimals - assert.strictEqual(math.floor(3.212, 2), 3.21); - assert.deepStrictEqual(math.floor(3.212, math.bignumber(2)), math.bignumber(3.21)); - assert.strictEqual(math.floor(-4.212, 2), -4.22); + assert.strictEqual(math.floor(3.212, 2), 3.21) + assert.deepStrictEqual( + math.floor(3.212, math.bignumber(2)), + math.bignumber(3.21) + ) + assert.strictEqual(math.floor(-4.212, 2), -4.22) // bignumber input assert.deepStrictEqual(math.floor(math.bignumber(3.212)), math.bignumber(3)) - assert.deepStrictEqual(math.floor(math.bignumber(3.212), 2), math.bignumber(3.21)) - assert.deepStrictEqual(math.floor(math.bignumber(3.212), math.bignumber(2)), math.bignumber(3.21)) + assert.deepStrictEqual( + math.floor(math.bignumber(3.212), 2), + math.bignumber(3.21) + ) + assert.deepStrictEqual( + math.floor(math.bignumber(3.212), math.bignumber(2)), + math.bignumber(3.21) + ) // fraction input - assert.deepStrictEqual(math.floor(math.fraction(44,7)), math.fraction(6)) - assert.deepStrictEqual(math.floor(math.fraction(-44,7)), math.fraction(-7)) - assert.deepStrictEqual(math.floor(math.fraction(44,7), 2), math.fraction(628,100)) - assert.deepStrictEqual(math.floor(math.fraction(44,7), math.bignumber(2)), math.fraction(628,100)) + assert.deepStrictEqual(math.floor(math.fraction(44, 7)), math.fraction(6)) + assert.deepStrictEqual(math.floor(math.fraction(-44, 7)), math.fraction(-7)) + assert.deepStrictEqual( + math.floor(math.fraction(44, 7), 2), + math.fraction(628, 100) + ) + assert.deepStrictEqual( + math.floor(math.fraction(44, 7), math.bignumber(2)), + math.fraction(628, 100) + ) // Complex input - const c = math.complex(3.24, -2.71); - assert.deepStrictEqual(math.floor(c), math.complex(3, -3)); - assert.deepStrictEqual(math.floor(c, 1), math.complex(3.2, -2.8)); - assert.deepStrictEqual(math.floor(c, math.bignumber(1)), math.complex(3.2, -2.8)); + const c = math.complex(3.24, -2.71) + assert.deepStrictEqual(math.floor(c), math.complex(3, -3)) + assert.deepStrictEqual(math.floor(c, 1), math.complex(3.2, -2.8)) + assert.deepStrictEqual( + math.floor(c, math.bignumber(1)), + math.complex(3.2, -2.8) + ) // array input - assert.deepStrictEqual(math.floor([3.2, 3.8, -4.7]), [3, 3, -5]); - assert.deepStrictEqual(math.floor([3.21, 3.82, -4.71], 1), [3.2, 3.8, -4.8]); - assert.deepStrictEqual(math.floor([3.21, 3.82, -4.71], math.bignumber(1)), - math.bignumber([3.2, 3.8, -4.8])); + assert.deepStrictEqual(math.floor([3.2, 3.8, -4.7]), [3, 3, -5]) + assert.deepStrictEqual(math.floor([3.21, 3.82, -4.71], 1), [3.2, 3.8, -4.8]) + assert.deepStrictEqual( + math.floor([3.21, 3.82, -4.71], math.bignumber(1)), + math.bignumber([3.2, 3.8, -4.8]) + ) // numeric input, array or matrix of decimals - let numFloored: math.MathArray = math.floor(math.tau, [2, 3]) - assert.deepStrictEqual(numFloored, [6.28, 6.283]); - let bigFloored: math.Matrix = math.floor(math.bignumber(6.28318), math.matrix([2, 3])); - assert.deepStrictEqual(bigFloored, math.matrix(math.bignumber([6.28, 6.283]))); - assert.deepStrictEqual(math.floor(math.fraction(44, 7), [2, 3]), - [math.fraction(628, 100), math.fraction(6285, 1000)]); + const numFloored: math.MathArray = math.floor(math.tau, [2, 3]) + assert.deepStrictEqual(numFloored, [6.28, 6.283]) + const bigFloored: math.Matrix = math.floor( + math.bignumber(6.28318), + math.matrix([2, 3]) + ) + assert.deepStrictEqual(bigFloored, math.matrix(math.bignumber([6.28, 6.283]))) + assert.deepStrictEqual(math.floor(math.fraction(44, 7), [2, 3]), [ + math.fraction(628, 100), + math.fraction(6285, 1000), + ]) - // array - array is (currently) undefined - //@ts-expect-error - assert.throws(() => math.floor([3.21, 3.82], [1, 2]), TypeError); + // @ts-expect-error ... verify floor(array, array) throws an error (for now) + assert.throws(() => math.floor([3.21, 3.82], [1, 2]), TypeError) } /* Function round examples */ { - const math = create(all, {}); + const math = create(all, {}) // number input - assert.strictEqual(math.round(3.2), 3); - assert.strictEqual(math.round(-4.2), -4); + assert.strictEqual(math.round(3.2), 3) + assert.strictEqual(math.round(-4.2), -4) // number input // roundoff result to 2 decimals - assert.strictEqual(math.round(3.212, 2), 3.21); - assert.deepStrictEqual(math.round(3.212, math.bignumber(2)), math.bignumber(3.21)); - assert.strictEqual(math.round(-4.212, 2), -4.21); + assert.strictEqual(math.round(3.212, 2), 3.21) + assert.deepStrictEqual( + math.round(3.212, math.bignumber(2)), + math.bignumber(3.21) + ) + assert.strictEqual(math.round(-4.212, 2), -4.21) // bignumber input assert.deepStrictEqual(math.round(math.bignumber(3.212)), math.bignumber(3)) - assert.deepStrictEqual(math.round(math.bignumber(3.212), 2), math.bignumber(3.21)) - assert.deepStrictEqual(math.round(math.bignumber(3.212), math.bignumber(2)), math.bignumber(3.21)) + assert.deepStrictEqual( + math.round(math.bignumber(3.212), 2), + math.bignumber(3.21) + ) + assert.deepStrictEqual( + math.round(math.bignumber(3.212), math.bignumber(2)), + math.bignumber(3.21) + ) // fraction input - assert.deepStrictEqual(math.round(math.fraction(44,7)), math.fraction(6)) - assert.deepStrictEqual(math.round(math.fraction(-44,7)), math.fraction(-6)) - assert.deepStrictEqual(math.round(math.fraction(44,7), 2), math.fraction(629,100)) - assert.deepStrictEqual(math.round(math.fraction(44,7), math.bignumber(2)), math.fraction(629,100)) + assert.deepStrictEqual(math.round(math.fraction(44, 7)), math.fraction(6)) + assert.deepStrictEqual(math.round(math.fraction(-44, 7)), math.fraction(-6)) + assert.deepStrictEqual( + math.round(math.fraction(44, 7), 2), + math.fraction(629, 100) + ) + assert.deepStrictEqual( + math.round(math.fraction(44, 7), math.bignumber(2)), + math.fraction(629, 100) + ) // Complex input - const c = math.complex(3.24, -2.71); - assert.deepStrictEqual(math.round(c), math.complex(3, -3)); - assert.deepStrictEqual(math.round(c, 1), math.complex(3.2, -2.7)); - assert.deepStrictEqual(math.round(c, math.bignumber(1)), math.complex(3.2, -2.7)); + const c = math.complex(3.24, -2.71) + assert.deepStrictEqual(math.round(c), math.complex(3, -3)) + assert.deepStrictEqual(math.round(c, 1), math.complex(3.2, -2.7)) + assert.deepStrictEqual( + math.round(c, math.bignumber(1)), + math.complex(3.2, -2.7) + ) // array input - assert.deepStrictEqual(math.round([3.2, 3.8, -4.7]), [3, 4, -5]); - assert.deepStrictEqual(math.round([3.21, 3.82, -4.71], 1), [3.2, 3.8, -4.7]); - assert.deepStrictEqual(math.round([3.21, 3.82, -4.71], math.bignumber(1)), - math.bignumber([3.2, 3.8, -4.7])); + assert.deepStrictEqual(math.round([3.2, 3.8, -4.7]), [3, 4, -5]) + assert.deepStrictEqual(math.round([3.21, 3.82, -4.71], 1), [3.2, 3.8, -4.7]) + assert.deepStrictEqual( + math.round([3.21, 3.82, -4.71], math.bignumber(1)), + math.bignumber([3.2, 3.8, -4.7]) + ) // numeric input, array or matrix of decimals - let numRounded: math.MathArray = math.round(math.tau, [2, 3]) - assert.deepStrictEqual(numRounded, [6.28, 6.283]); - let bigRounded: math.Matrix = math.round(math.bignumber(6.28318), math.matrix([2, 3])); - assert.deepStrictEqual(bigRounded, math.matrix(math.bignumber([6.28, 6.283]))); - assert.deepStrictEqual(math.round(math.fraction(44, 7), [2, 3]), - [math.fraction(629, 100), math.fraction(6286, 1000)]); + const numRounded: math.MathArray = math.round(math.tau, [2, 3]) + assert.deepStrictEqual(numRounded, [6.28, 6.283]) + const bigRounded: math.Matrix = math.round( + math.bignumber(6.28318), + math.matrix([2, 3]) + ) + assert.deepStrictEqual(bigRounded, math.matrix(math.bignumber([6.28, 6.283]))) + assert.deepStrictEqual(math.round(math.fraction(44, 7), [2, 3]), [ + math.fraction(629, 100), + math.fraction(6286, 1000), + ]) - // array - array is (currently) undefined - //@ts-expect-error - assert.throws(() => math.round([3.21, 3.82], [1, 2]), TypeError); + // @ts-expect-error ... verify round(array, array) throws an error (for now) + assert.throws(() => math.round([3.21, 3.82], [1, 2]), TypeError) } - /* JSON serialization/deserialization */ { - const math = create(all, {}); + const math = create(all, {}) const data = { bigNumber: math.bignumber('1.5'), - }; - const stringified = JSON.stringify(data); - const parsed = JSON.parse(stringified, math.reviver); - assert.deepStrictEqual(parsed.bigNumber, math.bignumber('1.5')); + } + const stringified = JSON.stringify(data) + const parsed = JSON.parse(stringified, math.reviver) + assert.deepStrictEqual(parsed.bigNumber, math.bignumber('1.5')) } /* @@ -734,14 +875,14 @@ Extend functionality with import declare module 'mathjs' { interface MathJsStatic { - testFun(): number; - value: number; + testFun(): number + value: number } } { - const math = create(all, {}); - const testFun = () => 5; + const math = create(all, {}) + const testFun = () => 5 math.import( { @@ -749,26 +890,26 @@ declare module 'mathjs' { value: 10, }, {} - ); + ) - math.testFun(); + math.testFun() - const a = math.value * 2; + const _a = math.value * 2 } /* Renamed functions from v5 => v6 */ { - const math = create(all, {}); - math.typeOf(1); - math.variance([1, 2, 3, 4]); - math.evaluate('1 + 2'); + const math = create(all, {}) + math.typeOf(1) + math.variance([1, 2, 3, 4]) + math.evaluate('1 + 2') // chained operations - math.chain(3).typeOf().done(); - math.chain([1, 2, 3]).variance().done(); - math.chain('1 + 2').evaluate().done(); + math.chain(3).typeOf().done() + math.chain([1, 2, 3]).variance().done() + math.chain('1 + 2').evaluate().done() } /* @@ -776,20 +917,20 @@ Factory Test */ { // create a factory function - const name = 'negativeSquare'; - const dependencies: MathJsFunctionName[] = ['multiply', 'unaryMinus']; + const name = 'negativeSquare' + const dependencies: MathJsFunctionName[] = ['multiply', 'unaryMinus'] const createNegativeSquare = factory(name, dependencies, (injected) => { - const { multiply, unaryMinus } = injected; + const { multiply, unaryMinus } = injected return function negativeSquare(x: number): number { - return unaryMinus(multiply(x, x)); - }; - }); + return unaryMinus(multiply(x, x)) + } + }) // create an instance of the function yourself: - const multiply = (a: number, b: number) => a * b; - const unaryMinus = (a: number) => -a; - const negativeSquare = createNegativeSquare({ multiply, unaryMinus }); - negativeSquare(3); + const multiply = (a: number, b: number) => a * b + const unaryMinus = (a: number) => -a + const negativeSquare = createNegativeSquare({ multiply, unaryMinus }) + negativeSquare(3) } /** @@ -799,7 +940,7 @@ Factory Test { const config = { // optionally, you can specify configuration - }; + } // Create just the functions we need const { fraction, add, divide, format } = create( @@ -810,15 +951,15 @@ Factory Test formatDependencies, }, config - ); + ) // Use the created functions - const a = fraction(1, 3); - const b = fraction(3, 7); - const c = add(a, b); - const d = divide(a, b); - assert.strictEqual(format(c), "16/21"); - assert.strictEqual(format(d), "7/9"); + const a = fraction(1, 3) + const b = fraction(3, 7) + const c = add(a, b) + const d = divide(a, b) + assert.strictEqual(format(c), '16/21') + assert.strictEqual(format(d), '7/9') } /** @@ -826,15 +967,15 @@ Factory Test * https://mathjs.org/docs/expressions/customization.html#customize-supported-characters */ { - const math = create(all, {}); - const isAlphaOriginal = math.parse.isAlpha; + const math = create(all, {}) + const isAlphaOriginal = math.parse.isAlpha math.parse.isAlpha = (c, cPrev, cNext) => { - return isAlphaOriginal(c, cPrev, cNext) || c === "\u260E"; - }; + return isAlphaOriginal(c, cPrev, cNext) || c === '\u260E' + } // now we can use the \u260E (phone) character in expressions - const result = math.evaluate("\u260Efoo", { "\u260Efoo": 42 }); - assert.strictEqual(result, 42); + const result = math.evaluate('\u260Efoo', { '\u260Efoo': 42 }) + assert.strictEqual(result, 42) } /** @@ -842,26 +983,30 @@ Factory Test * https://mathjs.org/docs/reference/functions.html#utils-functions */ { - const math = create(all, {}); + const math = create(all, {}) // hasNumericValue function - assert. strictEqual(math.hasNumericValue(2), true); - assert. strictEqual(math.hasNumericValue('2'), true); - assert. strictEqual(math.isNumeric('2'), false); - assert. strictEqual(math.hasNumericValue(0), true); - assert. strictEqual(math.hasNumericValue(math.bignumber(500)), true); - assert.deepStrictEqual(math.hasNumericValue([2.3, 'foo', false]), [true, false, true]); - assert. strictEqual(math.hasNumericValue(math.fraction(4)), true); - assert. strictEqual(math.hasNumericValue(math.complex('2-4i')), false); + assert.strictEqual(math.hasNumericValue(2), true) + assert.strictEqual(math.hasNumericValue('2'), true) + assert.strictEqual(math.isNumeric('2'), false) + assert.strictEqual(math.hasNumericValue(0), true) + assert.strictEqual(math.hasNumericValue(math.bignumber(500)), true) + assert.deepStrictEqual(math.hasNumericValue([2.3, 'foo', false]), [ + true, + false, + true, + ]) + assert.strictEqual(math.hasNumericValue(math.fraction(4)), true) + assert.strictEqual(math.hasNumericValue(math.complex('2-4i')), false) } /** * src/util/is functions */ { - const math = create(all, {}); + const math = create(all, {}) - type IsFunc = (x: unknown) => boolean; + type IsFunc = (x: unknown) => boolean const isFuncs: IsFunc[] = [ math.isNumber, math.isBigNumber, @@ -900,13 +1045,13 @@ Factory Test math.isParenthesisNode, math.isRangeNode, math.isSymbolNode, - math.isChain + math.isChain, ] - isFuncs.forEach(f => { - const result = f(1); - const isResultBoolean = result === true || result === false; - assert.ok(isResultBoolean); + isFuncs.forEach((f) => { + const result = f(1) + const isResultBoolean = result === true || result === false + assert.ok(isResultBoolean) }) // Check guards do type refinement @@ -1022,8 +1167,10 @@ Factory Test Probability function examples */ { - const math = create(all, {}); + const math = create(all, {}) expectTypeOf(math.lgamma(1.5)).toMatchTypeOf() - expectTypeOf(math.lgamma(math.complex(1.5, -1.5))).toMatchTypeOf() + expectTypeOf( + math.lgamma(math.complex(1.5, -1.5)) + ).toMatchTypeOf() }