From d0756a42b9f0bca0f23c9b338db9bcdee846a08d Mon Sep 17 00:00:00 2001 From: Simon Petrac Date: Thu, 12 Dec 2024 12:49:00 +0100 Subject: [PATCH] migration to github --- .github/workflows/npm-publish.yml | 33 + .gitignore | 4 +- LICENSE | 21 + README.md | 2 +- package-lock.json | 1290 +++++++++++++++++++++++++++++ package.json | 30 +- src/link.core.assert.js | 22 +- src/link.core.async.js | 8 +- src/link.core.errors.js | 8 +- src/link.core.is.js | 94 +-- src/link.core.objects.js | 22 +- src/link.core.strings.js | 2 +- src/link.core.ts.js | 30 +- src/link.core.tty.js | 20 +- test/util.helper.test.js | 108 +-- 15 files changed, 1519 insertions(+), 175 deletions(-) create mode 100644 .github/workflows/npm-publish.yml create mode 100644 LICENSE create mode 100644 package-lock.json diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..0205dee --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,33 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - run: npm ci + - run: npm test + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/.gitignore b/.gitignore index af1432b..22f619d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -/.*/ /node_modules/ -/package-lock.json +/.vscode/ +/.idea/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ad6e179 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 nicos Research & Development + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index d1d2c44..b5d50ed 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# @nrd/fua.core.util +# @fua/core.util diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..4ac6362 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1290 @@ +{ + "name": "@fua/core.util", + "version": "1.0.12", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@fua/core.util", + "version": "1.0.12", + "license": "MIT", + "dependencies": { + "@fua/core.assert": "^1.0.0", + "@fua/core.async": "^1.0.0", + "@fua/core.errors": "^1.0.1", + "@fua/core.is": "^1.0.4", + "@fua/core.objects": "^1.0.1", + "@fua/core.strings": "^1.0.1", + "@fua/core.ts": "^1.0.1", + "@fua/core.tty": "^1.0.0" + }, + "devDependencies": { + "expect": "26.x", + "mocha": "10.x" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@fua/core.assert": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@fua/core.assert/-/core.assert-1.0.3.tgz", + "integrity": "sha512-ppQqguYYjza77lE6sLIKXfi+kbsfY/LBELP7qcNMWgWbPwVl7w6+pEndU71bE9XdqwP8UqK47u6Aqb/2rGSQHA==", + "license": "MIT" + }, + "node_modules/@fua/core.async": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@fua/core.async/-/core.async-1.0.4.tgz", + "integrity": "sha512-N1XbziMU7CzTtrHm36urBbBFYI+PA1ZoMqJb0xewS75e19oPyTErWptLAM+iRs0j9MbFg4gDG07qM5+BVE9niA==", + "license": "MIT" + }, + "node_modules/@fua/core.errors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@fua/core.errors/-/core.errors-1.0.1.tgz", + "integrity": "sha512-cI2m3PPwxFk0VFW3Dro11azidCOhJC7zaKxnvhv2wYRX5w6Ob571X52+rdT5mUHi/2QAoRvaSy+SI4dW2drjYg==", + "license": "MIT" + }, + "node_modules/@fua/core.is": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@fua/core.is/-/core.is-1.0.7.tgz", + "integrity": "sha512-aRDGz4FE9hvAW4DC1NdlMSBCnsPGT09NlmOOn9LAMmwCQMZei1+nIuVx0qn0K/cNuTQK2cyBAKp8elnNDtBm5g==", + "license": "MIT" + }, + "node_modules/@fua/core.objects": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@fua/core.objects/-/core.objects-1.0.1.tgz", + "integrity": "sha512-NODTYHEbbjit1A1qyPRhtf+8vQaWEsOOWT9sbJ+TvAW/jj3XWNO1cGVHOCfXHwMy77q/COBRtkHl2BdbobGfdw==", + "license": "MIT" + }, + "node_modules/@fua/core.strings": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@fua/core.strings/-/core.strings-1.0.2.tgz", + "integrity": "sha512-NTz5hxdBX2ES0IFTjvlYhHe76G6eXVddprQJnZr0tInoUykVM0Y4gHQUWX8bguZfqls6I2MdbeTq0zDW5etFYg==", + "license": "MIT" + }, + "node_modules/@fua/core.ts": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@fua/core.ts/-/core.ts-1.0.3.tgz", + "integrity": "sha512-xJ/5AdFTTWaRMbWhMabV0AFydZURu7axD+ecovwuSbfmy6OG/QkOLu2l5qFxjNmnfYwsqxgoVPc/AiVnz0QBZg==", + "license": "MIT" + }, + "node_modules/@fua/core.tty": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@fua/core.tty/-/core.tty-1.1.0.tgz", + "integrity": "sha512-lVGxNrEdrXIb+wvJiqGzTlUgi9LfgMdnpc5MByTD3/Xk5nczmr+Cb5CmRwzLQ5fZmevOfBzlHmqDhFg/9qd+bQ==", + "license": "MIT" + }, + "node_modules/@jest/types": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", + "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/node": { + "version": "22.10.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz", + "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.20.0" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/yargs": { + "version": "15.0.19", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.19.tgz", + "integrity": "sha512-2XUaGVmyQjgyAZldf0D0c14vvo/yv0MhQBSTJcejMMaitsn3nxCB6TmH4G0ZQf+uxROOa9mpanoSm8h6SG/1ZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "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, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "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, + "license": "Python-2.0" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true, + "license": "ISC" + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "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, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "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, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/diff-sequences": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", + "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "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, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/expect": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.2.tgz", + "integrity": "sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^26.6.2", + "ansi-styles": "^4.0.0", + "jest-get-type": "^26.3.0", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-regex-util": "^26.0.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "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, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-diff": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz", + "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^26.6.2", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-get-type": { + "version": "26.3.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz", + "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-matcher-utils": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz", + "integrity": "sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^26.6.2", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-message-util": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.2.tgz", + "integrity": "sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.2", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "pretty-format": "^26.6.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-regex-util": { + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-26.0.0.tgz", + "integrity": "sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "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, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha": { + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", + "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pretty-format": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", + "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^26.6.2", + "ansi-regex": "^5.0.0", + "ansi-styles": "^4.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true, + "license": "MIT" + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "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" + } + ], + "license": "MIT" + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "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, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "dev": true, + "license": "MIT" + }, + "node_modules/workerpool": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/package.json b/package.json index fb3e502..a26029f 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@nrd/fua.core.util", + "name": "@fua/core.util", "version": "1.0.12", "description": "", "main": "src/core.util.js", @@ -7,18 +7,18 @@ "src/*" ], "dependencies": { - "@nrd/fua.core.assert": "^1.0.0", - "@nrd/fua.core.async": "^1.0.0", - "@nrd/fua.core.is": "^1.0.4", - "@nrd/fua.core.strings": "^1.0.1", - "@nrd/fua.core.objects": "^1.0.1", - "@nrd/fua.core.errors": "^1.0.1", - "@nrd/fua.core.ts": "^1.0.1", - "@nrd/fua.core.tty": "^1.0.0" + "@fua/core.assert": "^1.0.0", + "@fua/core.async": "^1.0.0", + "@fua/core.is": "^1.0.4", + "@fua/core.strings": "^1.0.1", + "@fua/core.objects": "^1.0.1", + "@fua/core.errors": "^1.0.1", + "@fua/core.ts": "^1.0.1", + "@fua/core.tty": "^1.0.0" }, "devDependencies": { - "mocha": "^8.2.1", - "expect": "^26.6.2" + "expect": "26.x", + "mocha": "10.x" }, "scripts": { "test": "mocha" @@ -30,8 +30,8 @@ }, "repository": { "type": "git", - "url": "ssh://git@git02.int.nsc.ag:10022/research/fua/core/util.git" + "url": "ssh://git@github.com:nicosResearchAndDevelopment/fua.core.util.git" }, - "author": "spetrac@nicos-ag.com", - "license": "UNLICENSED" -} + "author": "Simon Petrac ", + "license": "MIT" +} \ No newline at end of file diff --git a/src/link.core.assert.js b/src/link.core.assert.js index 9adc621..ee8af3f 100644 --- a/src/link.core.assert.js +++ b/src/link.core.assert.js @@ -1,14 +1,14 @@ -const assert = require('@nrd/fua.core.assert'); -const is = require('@nrd/fua.core.is'); +const assert = require('@fua/core.assert'); +const is = require('@fua/core.is'); -exports.Assert = function (source = 'unspecified source') { - return (value, errMsg = 'unspecified error', errType = Error) => assert(value, source + ' : ' + errMsg, errType); +exports.Assert = function (source = 'unspecified source') { + return (value, errMsg = 'unspecified error', errType = Error) => assert(value, source + ' : ' + errMsg, errType); }; -exports.assert = (value, errMsg = 'unspecified error', errType = Error) => assert(value, errMsg, errType); -exports.assertNull = (value, errMsg = 'expected to be null') => assert(is.null(value), errMsg); -exports.assertNotNull = (value, errMsg = 'expected not to be null') => assert(is.notnull(value), errMsg); -exports.assertFalse = (value, errMsg = 'expected to be false') => assert(!value, errMsg); -exports.assertTrue = (value, errMsg = 'expected to be true') => assert(!!value, errMsg); -exports.assertEquals = (value, other, errMsg = 'expected to be equal') => assert(value === other, errMsg); +exports.assert = (value, errMsg = 'unspecified error', errType = Error) => assert(value, errMsg, errType); +exports.assertNull = (value, errMsg = 'expected to be null') => assert(is.null(value), errMsg); +exports.assertNotNull = (value, errMsg = 'expected not to be null') => assert(is.notnull(value), errMsg); +exports.assertFalse = (value, errMsg = 'expected to be false') => assert(!value, errMsg); +exports.assertTrue = (value, errMsg = 'expected to be true') => assert(!!value, errMsg); +exports.assertEquals = (value, other, errMsg = 'expected to be equal') => assert(value === other, errMsg); exports.assertNotEquals = (value, other, errMsg = 'expected not to be equal') => assert(value !== other, errMsg); -exports.assertTodo = (errMsg = 'not implemented') => assert.todo(errMsg); +exports.assertTodo = (errMsg = 'not implemented') => assert.todo(errMsg); diff --git a/src/link.core.async.js b/src/link.core.async.js index 3516296..6e4bb82 100644 --- a/src/link.core.async.js +++ b/src/link.core.async.js @@ -1,6 +1,6 @@ -const async = require('@nrd/fua.core.async'); +const async = require('@fua/core.async'); -exports.promify = async.promify; -exports.promisify = async.promisify; -exports.callbacky = async.callbacky; +exports.promify = async.promify; +exports.promisify = async.promisify; +exports.callbacky = async.callbacky; exports.callbackify = async.callbackify; diff --git a/src/link.core.errors.js b/src/link.core.errors.js index 7fc0b27..0130555 100644 --- a/src/link.core.errors.js +++ b/src/link.core.errors.js @@ -1,12 +1,12 @@ -const errors = require('@nrd/fua.core.errors'); +const errors = require('@fua/core.errors'); -exports.Error = errors.Error; +exports.Error = errors.Error; exports.TypeError = errors.TypeError; -exports.HTTPRequestError = errors.http.RequestError; +exports.HTTPRequestError = errors.http.RequestError; exports.HTTPResponseError = errors.http.ResponseError; -exports.errorToJSON = errors.toJSON; +exports.errorToJSON = errors.toJSON; exports.errorFromJSON = errors.fromJSON; exports.HTTP_STATUS_CODES = errors.http.statusCodes; diff --git a/src/link.core.is.js b/src/link.core.is.js index abddf4c..e6e4ddc 100644 --- a/src/link.core.is.js +++ b/src/link.core.is.js @@ -1,60 +1,60 @@ -const is = require('@nrd/fua.core.is'); -exports.isDefined = (value) => is.defined(value); -exports.isUndefined = (value) => is.undefined(value); -exports.isNull = (value) => is.null(value); -exports.isNotNull = (value) => is.notnull(value); -exports.isPrimitive = (value) => is.primitive(value); +const is = require('@fua/core.is'); +exports.isDefined = (value) => is.defined(value); +exports.isUndefined = (value) => is.undefined(value); +exports.isNull = (value) => is.null(value); +exports.isNotNull = (value) => is.notnull(value); +exports.isPrimitive = (value) => is.primitive(value); exports.isPrimitiveArray = (value) => is.array(value) && value.every(is.primitive); -exports.isTruthy = (value) => is.boolean.truthy(value); -exports.isFalsy = (value) => is.boolean.falsy(value); -exports.isBoolean = (value) => is.boolean(value); -exports.isBooleanArray = (value) => is.array.booleans(value); -exports.isNumber = (value) => is.number.float(value); -exports.isAnyNumber = (value) => is.number(value); -exports.isNumberArray = (value) => is.array(value) && value.every(is.number.float); -exports.isFiniteNumber = (value) => is.number.float.finite(value); -exports.isInteger = (value) => is.number.integer(value); -exports.isBigInt = (value) => is.number.bigint(value); -exports.isString = (value) => is.string(value); -exports.isStringArray = (value) => is.array.strings(value); -exports.isSymbol = (value) => is.symbol(value); -exports.isFunction = (value) => is.function(value); -exports.isObject = (value) => is.object(value); -exports.isNativeObject = (value) => is.object.native(value); -exports.isObjectArray = (value) => is.array(value) && value.every(is.object); -exports.isArray = (value) => is.array(value); -exports.isIterable = (value) => value && is.function(value[Symbol.iterator]); -exports.isDate = (value) => is.date.valid(value); -exports.isAnyDate = (value) => is.date(value); -exports.isRegExp = (value) => value instanceof RegExp; -exports.isError = (value) => is.object.instance.error(value); -exports.isBuffer = (value) => is.object.instance.buffer(value); -exports.isTypedArray = (value) => ArrayBuffer.isView(value) && !(value instanceof DataView); -exports.isDatatype = (value) => is.string.datatype(value); +exports.isTruthy = (value) => is.boolean.truthy(value); +exports.isFalsy = (value) => is.boolean.falsy(value); +exports.isBoolean = (value) => is.boolean(value); +exports.isBooleanArray = (value) => is.array.booleans(value); +exports.isNumber = (value) => is.number.float(value); +exports.isAnyNumber = (value) => is.number(value); +exports.isNumberArray = (value) => is.array(value) && value.every(is.number.float); +exports.isFiniteNumber = (value) => is.number.float.finite(value); +exports.isInteger = (value) => is.number.integer(value); +exports.isBigInt = (value) => is.number.bigint(value); +exports.isString = (value) => is.string(value); +exports.isStringArray = (value) => is.array.strings(value); +exports.isSymbol = (value) => is.symbol(value); +exports.isFunction = (value) => is.function(value); +exports.isObject = (value) => is.object(value); +exports.isNativeObject = (value) => is.object.native(value); +exports.isObjectArray = (value) => is.array(value) && value.every(is.object); +exports.isArray = (value) => is.array(value); +exports.isIterable = (value) => value && is.function(value[Symbol.iterator]); +exports.isDate = (value) => is.date.valid(value); +exports.isAnyDate = (value) => is.date(value); +exports.isRegExp = (value) => value instanceof RegExp; +exports.isError = (value) => is.object.instance.error(value); +exports.isBuffer = (value) => is.object.instance.buffer(value); +exports.isTypedArray = (value) => ArrayBuffer.isView(value) && !(value instanceof DataView); +exports.isDatatype = (value) => is.string.datatype(value); -exports.StringValidator = function (pattern) { - return is.validator.string(pattern); +exports.StringValidator = function (pattern) { + return is.validator.string(pattern); }; -exports.ArrayValidator = function (checker) { - return is.validator.array(checker); +exports.ArrayValidator = function (checker) { + return is.validator.array(checker); }; -exports.EnumValidator = function (choices) { - return is.validator.enum(choices); +exports.EnumValidator = function (choices) { + return is.validator.enum(choices); }; -exports.InstanceValidator = function (classFunction) { - return is.validator.instance(classFunction); +exports.InstanceValidator = function (classFunction) { + return is.validator.instance(classFunction); }; -exports.DatatypeValidator = function (datatype) { - return is.validator.datatype(datatype); +exports.DatatypeValidator = function (datatype) { + return is.validator.datatype(datatype); }; exports.ConcatenationValidator = function (concatenations) { - return is.validator.concatenation(concatenations); + return is.validator.concatenation(concatenations); }; -exports.AlternativeValidator = function (alternatives) { - return is.validator.alternative(alternatives); +exports.AlternativeValidator = function (alternatives) { + return is.validator.alternative(alternatives); }; -exports.OptionalValidator = function (validator) { - return is.validator.optional(validator); +exports.OptionalValidator = function (validator) { + return is.validator.optional(validator); }; // exports.extractType = (value) => is.inspect(value); diff --git a/src/link.core.objects.js b/src/link.core.objects.js index 77a3416..35c5191 100644 --- a/src/link.core.objects.js +++ b/src/link.core.objects.js @@ -1,13 +1,13 @@ -const objects = require('@nrd/fua.core.objects'); +const objects = require('@fua/core.objects'); -exports.extendObject = (target = {}, ...sourceArr) => objects.extend(target, ...sourceArr); -exports.reduceObject = (target = {}, ...sourceArr) => objects.reduce(target, ...sourceArr); -exports.lockProp = (obj, ...keys) => objects.lock.props(obj, ...keys); -exports.lockAllProp = (obj, depth = 0) => objects.lock.recursive(obj, depth); +exports.extendObject = (target = {}, ...sourceArr) => objects.extend(target, ...sourceArr); +exports.reduceObject = (target = {}, ...sourceArr) => objects.reduce(target, ...sourceArr); +exports.lockProp = (obj, ...keys) => objects.lock.props(obj, ...keys); +exports.lockAllProp = (obj, depth = 0) => objects.lock.recursive(obj, depth); exports.defaultLockProp = (obj, ...keys) => objects.lock.defaults(obj, ...keys); -exports.hideProp = (obj, ...keys) => objects.hide.props(obj, ...keys); -exports.freezeAllProp = (obj, depth = 0) => objects.freeze.recursive(obj, depth); -exports.objectMatches = (subject, target) => objects.matches(subject, target); -exports.objectEquals = (subject, target) => objects.equals(subject, target); -exports.toArray = (value) => objects.array(value); -exports.toFrozenArray = (value) => objects.array.freeze(value); +exports.hideProp = (obj, ...keys) => objects.hide.props(obj, ...keys); +exports.freezeAllProp = (obj, depth = 0) => objects.freeze.recursive(obj, depth); +exports.objectMatches = (subject, target) => objects.matches(subject, target); +exports.objectEquals = (subject, target) => objects.equals(subject, target); +exports.toArray = (value) => objects.array(value); +exports.toFrozenArray = (value) => objects.array.freeze(value); diff --git a/src/link.core.strings.js b/src/link.core.strings.js index 7fedbb3..a509bb7 100644 --- a/src/link.core.strings.js +++ b/src/link.core.strings.js @@ -1,3 +1,3 @@ -const strings = require('@nrd/fua.core.strings'); +const strings = require('@fua/core.strings'); exports.stringToRegExp = strings.toRegExp; diff --git a/src/link.core.ts.js b/src/link.core.ts.js index 5b05728..e683141 100644 --- a/src/link.core.ts.js +++ b/src/link.core.ts.js @@ -1,17 +1,17 @@ -const is = require('@nrd/fua.core.is'); -const ts = require('@nrd/fua.core.ts'); +const is = require('@fua/core.is'); +const ts = require('@fua/core.ts'); -const _secondsToMS = (value) => is.number(value) ? 1e3 * value : value; -const _msToSeconds = (value) => is.number(value) ? value / 1e3 : value; -exports.unixTime = (rounded = false) => rounded ? ts.unix.rounded() : ts.unix(); -exports.time = (value) => ts.time(_secondsToMS(value)); -exports.localTime = (value) => ts.time.local(_secondsToMS(value)); -exports.utcTime = (value) => ts.time.utc(_secondsToMS(value)); -exports.date = (value) => ts.date(_secondsToMS(value)); -exports.localDate = (value) => ts.date.local(_secondsToMS(value)); -exports.utcDate = (value) => ts.date.utc(_secondsToMS(value)); -exports.dateTime = (value) => ts.dateTime(_secondsToMS(value)); +const _secondsToMS = (value) => is.number(value) ? 1e3 * value : value; +const _msToSeconds = (value) => is.number(value) ? value / 1e3 : value; +exports.unixTime = (rounded = false) => rounded ? ts.unix.rounded() : ts.unix(); +exports.time = (value) => ts.time(_secondsToMS(value)); +exports.localTime = (value) => ts.time.local(_secondsToMS(value)); +exports.utcTime = (value) => ts.time.utc(_secondsToMS(value)); +exports.date = (value) => ts.date(_secondsToMS(value)); +exports.localDate = (value) => ts.date.local(_secondsToMS(value)); +exports.utcDate = (value) => ts.date.utc(_secondsToMS(value)); +exports.dateTime = (value) => ts.dateTime(_secondsToMS(value)); exports.localDateTime = (value) => ts.dateTime.local(_secondsToMS(value)); -exports.utcDateTime = (value) => ts.dateTime.utc(_secondsToMS(value)); -exports.duration = (value, reference) => _msToSeconds(ts.duration(_secondsToMS(value), _secondsToMS(reference))); -exports.pause = (value) => ts.pause(_secondsToMS(value)); +exports.utcDateTime = (value) => ts.dateTime.utc(_secondsToMS(value)); +exports.duration = (value, reference) => _msToSeconds(ts.duration(_secondsToMS(value), _secondsToMS(reference))); +exports.pause = (value) => ts.pause(_secondsToMS(value)); diff --git a/src/link.core.tty.js b/src/link.core.tty.js index fdac197..9735a6b 100644 --- a/src/link.core.tty.js +++ b/src/link.core.tty.js @@ -1,12 +1,12 @@ -const tty = require('@nrd/fua.core.tty'); +const tty = require('@fua/core.tty'); -exports.logText = (txt) => tty.log.text(txt); -exports.logWarning = (msg = 'warning') => tty.log.warning(msg); -exports.logDone = (msg = 'done') => tty.log.done(msg); -exports.logSuccess = (msg = 'success') => tty.log.success(msg); -exports.logError = (txt) => tty.error(txt); -exports.logObject = (txt) => tty.log(txt); -exports.logTodo = (msg = '') => tty.log.todo(msg); -exports.logRequest = (request) => tty.log.request(request); +exports.logText = (txt) => tty.log.text(txt); +exports.logWarning = (msg = 'warning') => tty.log.warning(msg); +exports.logDone = (msg = 'done') => tty.log.done(msg); +exports.logSuccess = (msg = 'success') => tty.log.success(msg); +exports.logError = (txt) => tty.error(txt); +exports.logObject = (txt) => tty.log(txt); +exports.logTodo = (msg = '') => tty.log.todo(msg); +exports.logRequest = (request) => tty.log.request(request); exports.logResponse = (response) => tty.log.response(response); -exports.logTable = (rows, columns, tableName) => tty.log.table(rows, columns, tableName); +exports.logTable = (rows, columns, tableName) => tty.log.table(rows, columns, tableName); diff --git a/test/util.helper.test.js b/test/util.helper.test.js index e3c0638..0b60354 100644 --- a/test/util.helper.test.js +++ b/test/util.helper.test.js @@ -1,68 +1,68 @@ const - {describe, test} = require('mocha'), - expect = require('expect'), - _ = require('../src/core.util.js'); + { describe, test } = require('mocha'), + expect = require('expect'), + _ = require('../src/core.util.js'); describe('core.util.helper', function () { - test('promify & promisify', async function () { + test('promify & promisify', async function () { - const - testObj = {msg: 'Hello World!'}, - testFn = function (arg0, arg1, cb) { - setTimeout(() => { - try { - if (this?.msg) { - cb(null, this.msg); - } else { - const res = arg0 + arg1; - cb(null, res); - } - } catch (err) { - cb(err); - } - }, 20); + const + testObj = { msg: 'Hello World!' }, + testFn = function (arg0, arg1, cb) { + setTimeout(() => { + try { + if (this?.msg) { + cb(null, this.msg); + } else { + const res = arg0 + arg1; + cb(null, res); } + } catch (err) { + cb(err); + } + }, 20); + } - expect(await _.promify(testFn, 1, 2)).toBe(3); - expect(await _.promify(testFn, '1', '2')).toBe('12'); - expect(await _.promify(testFn, '1', '2')).toBe('12'); - expect(await _.promify.call(testObj, testFn, '1', '2')).toBe('Hello World!'); + expect(await _.promify(testFn, 1, 2)).toBe(3); + expect(await _.promify(testFn, '1', '2')).toBe('12'); + expect(await _.promify(testFn, '1', '2')).toBe('12'); + expect(await _.promify.call(testObj, testFn, '1', '2')).toBe('Hello World!'); - const testWrap = _.promisify(testFn); + const testWrap = _.promisify(testFn); - expect(await testWrap(1, 2)).toBe(3); - expect(await testWrap('1', '2')).toBe('12'); - expect(await testWrap('1', '2')).toBe('12'); - expect(await testWrap.call(testObj, '1', '2')).toBe('Hello World!'); + expect(await testWrap(1, 2)).toBe(3); + expect(await testWrap('1', '2')).toBe('12'); + expect(await testWrap('1', '2')).toBe('12'); + expect(await testWrap.call(testObj, '1', '2')).toBe('Hello World!'); - }); + }); - test('extractType', function () { - const obj = {test: ['hello', 123], lorem: 'ipsum', bool: true}; - console.log(_.extractType(obj)); - const set = new Set([123, 'hello', Symbol.hasInstance, BigInt(2)]); - console.log(_.extractType(set)); - const map = new Map([['test', 123], ['hello', [1, 2, 3, 4]]]); - console.log(_.extractType(map)); - const buffer = Buffer.from('test'); - console.log(_.extractType(buffer)); - const promise = Promise.resolve(123); - console.log(_.extractType(promise)); - const iterator = new Set([1, 2, 3, 'test']).values(); - console.log(_.extractType(iterator)); - }); + // test('extractType', function () { + // const obj = {test: ['hello', 123], lorem: 'ipsum', bool: true}; + // console.log(_.extractType(obj)); + // const set = new Set([123, 'hello', Symbol.hasInstance, BigInt(2)]); + // console.log(_.extractType(set)); + // const map = new Map([['test', 123], ['hello', [1, 2, 3, 4]]]); + // console.log(_.extractType(map)); + // const buffer = Buffer.from('test'); + // console.log(_.extractType(buffer)); + // const promise = Promise.resolve(123); + // console.log(_.extractType(promise)); + // const iterator = new Set([1, 2, 3, 'test']).values(); + // console.log(_.extractType(iterator)); + // }); - test('createErrorClass', function () { - const ErrClass = _.createErrorClass('TestError', 'ERROR_TEST'); - const err = new ErrClass('test message') - console.log(err); - console.log(err instanceof Error); - console.log(err.message); - console.log(err.code); - console.log(err.stack); - console.log(err.toString()); - console.log(ErrClass('test message')); - }); + test('createErrorClass', function () { + const ErrClass = _.createErrorClass('TestError', 'ERROR_TEST'); + const err = new ErrClass('test message') + console.log(err); + console.log(err instanceof Error); + console.log(err.message); + console.log(err.code); + console.log(err.stack); + console.log(err.toString()); + console.log(ErrClass('test message')); + }); });