From a7dc76d414010bc53c5a4556e3f93b2a6e8df818 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 2 Feb 2023 04:53:33 +0000 Subject: [PATCH 001/208] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a58703d..81259e5 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,8 @@ }, "dependencies": { "@stdlib/array-base-assert-is-accessor-array": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" + "@stdlib/utils-define-read-only-property": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x" }, "devDependencies": { "@stdlib/array-complex128": "^0.0.x", @@ -88,4 +89,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} +} \ No newline at end of file From ce0342804d435a90f31c263fcd0cb04be01f4e13 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 2 Feb 2023 05:07:24 +0000 Subject: [PATCH 002/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 791 --- .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 184 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 43 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 51 - package.json | 69 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 33 files changed, 6206 insertions(+), 3225 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 65333da..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 52d30ff..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4eea88..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,791 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\"/\"@stdlib\/error-tools-fmtprodmsg\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^0.0.x'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -111,7 +110,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -173,7 +172,7 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 85bda63..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index ed1e2f4..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* tslint:disable:no-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..a9dda2f --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@esm/index.mjs";var e={};s(e,"isAccessorArray",r);export{e as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e33b136 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAccessorArray"],"mappings":";;0UAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,kBAAAE"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2f9fa45..0000000 --- a/lib/index.js +++ /dev/null @@ -1,51 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 81259e5..3a9d240 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,47 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-is-accessor-array": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x" - }, - "devDependencies": { - "@stdlib/array-complex128": "^0.0.x", - "@stdlib/array-complex64": "^0.0.x", - "@stdlib/array-float32": "^0.0.x", - "@stdlib/array-float64": "^0.0.x", - "@stdlib/array-int16": "^0.0.x", - "@stdlib/array-int32": "^0.0.x", - "@stdlib/array-int8": "^0.0.x", - "@stdlib/array-uint16": "^0.0.x", - "@stdlib/array-uint32": "^0.0.x", - "@stdlib/array-uint8": "^0.0.x", - "@stdlib/array-uint8c": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/buffer-alloc-unsafe": "^0.0.x", - "@stdlib/utils-constructor-name": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", @@ -89,4 +26,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..b500e2b --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1a9ea91..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 6ed680aae375566ac3b0c1dd666ead7e5d70f605 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 2 Feb 2023 05:10:07 +0000 Subject: [PATCH 003/208] Update README.md for ESM bundle v0.0.1 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ad1f589..1c62c28 100644 --- a/README.md +++ b/README.md @@ -31,13 +31,13 @@ limitations under the License. ## Usage ```javascript -import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@esm/index.mjs'; +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@v0.0.1-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { isAccessorArray } from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@esm/index.mjs'; +import { isAccessorArray } from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@v0.0.1-esm/index.mjs'; ``` #### ns @@ -80,7 +80,7 @@ The namespace exports the following: - - - - From 43c03ab8863d5272f02a87992770f5ae45fdeeae Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 2 Apr 2023 01:10:19 +0000 Subject: [PATCH 007/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 43 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 60 - package.json | 77 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 33 files changed, 6205 insertions(+), 3384 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 65333da..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 52d30ff..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 3e8e2db..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,798 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -111,7 +110,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -173,7 +172,7 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 698c6bf..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index ed1e2f4..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* tslint:disable:no-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..799b112 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c12e2d3 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;siBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 1281b35..0000000 --- a/lib/index.js +++ /dev/null @@ -1,60 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index fbf36ea..eec2fca 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,57 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "github:stdlib-js/array-base-assert-contains#main", - "@stdlib/array-base-assert-is-accessor-array": "^0.0.1", - "@stdlib/utils-define-read-only-property": "^0.0.8" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.0.1", - "@stdlib/array-base-accessor-getter": "^0.0.1", - "@stdlib/array-base-getter": "^0.0.1", - "@stdlib/array-base-ones": "^0.0.2", - "@stdlib/array-complex128": "^0.0.6", - "@stdlib/array-complex64": "^0.0.6", - "@stdlib/array-dtype": "^0.0.6", - "@stdlib/array-float32": "^0.0.6", - "@stdlib/array-float64": "^0.0.6", - "@stdlib/array-int16": "^0.0.6", - "@stdlib/array-int32": "^0.0.6", - "@stdlib/array-int8": "^0.0.6", - "@stdlib/array-uint16": "^0.0.6", - "@stdlib/array-uint32": "^0.0.6", - "@stdlib/array-uint8": "^0.0.7", - "@stdlib/array-uint8c": "^0.0.8", - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-collection": "^0.0.8", - "@stdlib/bench": "^0.0.12", - "@stdlib/buffer-alloc-unsafe": "^0.0.7", - "@stdlib/math-base-special-pow": "^0.0.7", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2", - "@stdlib/utils-constructor-name": "^0.0.8", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-keys": "^0.0.7", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..a80d568 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1a9ea91..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 32b94a9aae748fab9192294adde32bef1ad415b9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 13 Apr 2023 08:12:27 +0000 Subject: [PATCH 008/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8b9d97c..fbf36ea 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@stdlib/bench": "^0.0.12", "@stdlib/buffer-alloc-unsafe": "^0.0.7", "@stdlib/math-base-special-pow": "^0.0.7", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/utils-constructor-name": "^0.0.8", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", "@stdlib/utils-keys": "^0.0.7", From c30d5e28e2f8e1329028da0f01f5cc99a8919b28 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 13 Apr 2023 08:12:54 +0000 Subject: [PATCH 009/208] Remove files --- index.d.ts | 58 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6240 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a09c783..0000000 --- a/index.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( `@stdlib/array/complex128` ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 799b112..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c12e2d3..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;siBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index a80d568..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 05e104a1ef5618c46fe6bfd51fc3b29477671a09 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 13 Apr 2023 08:14:00 +0000 Subject: [PATCH 010/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 43 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 60 - package.json | 77 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 33 files changed, 6205 insertions(+), 3384 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 65333da..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 52d30ff..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 3e8e2db..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,798 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -111,7 +110,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -173,7 +172,7 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 698c6bf..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index ed1e2f4..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* tslint:disable:no-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..799b112 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c12e2d3 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;siBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 1281b35..0000000 --- a/lib/index.js +++ /dev/null @@ -1,60 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index fbf36ea..eec2fca 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,57 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "github:stdlib-js/array-base-assert-contains#main", - "@stdlib/array-base-assert-is-accessor-array": "^0.0.1", - "@stdlib/utils-define-read-only-property": "^0.0.8" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.0.1", - "@stdlib/array-base-accessor-getter": "^0.0.1", - "@stdlib/array-base-getter": "^0.0.1", - "@stdlib/array-base-ones": "^0.0.2", - "@stdlib/array-complex128": "^0.0.6", - "@stdlib/array-complex64": "^0.0.6", - "@stdlib/array-dtype": "^0.0.6", - "@stdlib/array-float32": "^0.0.6", - "@stdlib/array-float64": "^0.0.6", - "@stdlib/array-int16": "^0.0.6", - "@stdlib/array-int32": "^0.0.6", - "@stdlib/array-int8": "^0.0.6", - "@stdlib/array-uint16": "^0.0.6", - "@stdlib/array-uint32": "^0.0.6", - "@stdlib/array-uint8": "^0.0.7", - "@stdlib/array-uint8c": "^0.0.8", - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-collection": "^0.0.8", - "@stdlib/bench": "^0.0.12", - "@stdlib/buffer-alloc-unsafe": "^0.0.7", - "@stdlib/math-base-special-pow": "^0.0.7", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2", - "@stdlib/utils-constructor-name": "^0.0.8", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-keys": "^0.0.7", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..62d1185 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1a9ea91..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From f18f11db30ca80540dd0fe7cc376afc1ef32aebc Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 13 Apr 2023 17:02:11 +0000 Subject: [PATCH 011/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8b9d97c..fbf36ea 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@stdlib/bench": "^0.0.12", "@stdlib/buffer-alloc-unsafe": "^0.0.7", "@stdlib/math-base-special-pow": "^0.0.7", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/utils-constructor-name": "^0.0.8", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", "@stdlib/utils-keys": "^0.0.7", From b2ace901786b037b6e9183fc0cc31d93c69086c7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 13 Apr 2023 17:02:59 +0000 Subject: [PATCH 012/208] Remove files --- index.d.ts | 83 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6265 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index dfcf79d..0000000 --- a/index.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( `@stdlib/array/complex128` ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 799b112..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c12e2d3..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;siBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 62d1185..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From a1448f709a9a07063609bc600487c80435d3fd52 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 13 Apr 2023 17:03:53 +0000 Subject: [PATCH 013/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 45 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 60 - package.json | 77 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 33 files changed, 6206 insertions(+), 3385 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 65333da..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 52d30ff..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 3e8e2db..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,798 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -112,7 +111,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -174,9 +173,9 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 698c6bf..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index ed1e2f4..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* tslint:disable:no-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..799b112 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c12e2d3 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;siBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 1281b35..0000000 --- a/lib/index.js +++ /dev/null @@ -1,60 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index fbf36ea..eec2fca 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,57 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "github:stdlib-js/array-base-assert-contains#main", - "@stdlib/array-base-assert-is-accessor-array": "^0.0.1", - "@stdlib/utils-define-read-only-property": "^0.0.8" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.0.1", - "@stdlib/array-base-accessor-getter": "^0.0.1", - "@stdlib/array-base-getter": "^0.0.1", - "@stdlib/array-base-ones": "^0.0.2", - "@stdlib/array-complex128": "^0.0.6", - "@stdlib/array-complex64": "^0.0.6", - "@stdlib/array-dtype": "^0.0.6", - "@stdlib/array-float32": "^0.0.6", - "@stdlib/array-float64": "^0.0.6", - "@stdlib/array-int16": "^0.0.6", - "@stdlib/array-int32": "^0.0.6", - "@stdlib/array-int8": "^0.0.6", - "@stdlib/array-uint16": "^0.0.6", - "@stdlib/array-uint32": "^0.0.6", - "@stdlib/array-uint8": "^0.0.7", - "@stdlib/array-uint8c": "^0.0.8", - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-collection": "^0.0.8", - "@stdlib/bench": "^0.0.12", - "@stdlib/buffer-alloc-unsafe": "^0.0.7", - "@stdlib/math-base-special-pow": "^0.0.7", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2", - "@stdlib/utils-constructor-name": "^0.0.8", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-keys": "^0.0.7", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..81f1c80 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1a9ea91..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From f98db3e430e9cbd91042c2d14c47bcc636aaf105 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 24 Jul 2023 16:18:12 +0000 Subject: [PATCH 014/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8b9d97c..fbf36ea 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@stdlib/bench": "^0.0.12", "@stdlib/buffer-alloc-unsafe": "^0.0.7", "@stdlib/math-base-special-pow": "^0.0.7", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/utils-constructor-name": "^0.0.8", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", "@stdlib/utils-keys": "^0.0.7", From bc9208248e5dc076744cb32c09b18c2c1ea58631 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 24 Jul 2023 16:52:44 +0000 Subject: [PATCH 015/208] Remove files --- index.d.ts | 83 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6265 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index dfcf79d..0000000 --- a/index.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( `@stdlib/array/complex128` ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 799b112..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c12e2d3..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;siBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 81f1c80..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 9c0aad1af06bab5dccc51bb47d5cac731c5ed78b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 24 Jul 2023 16:53:42 +0000 Subject: [PATCH 016/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 45 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 60 - package.json | 77 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 33 files changed, 6206 insertions(+), 3385 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 65333da..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 52d30ff..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 3e8e2db..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,798 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -112,7 +111,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -174,9 +173,9 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 698c6bf..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index ed1e2f4..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* tslint:disable:no-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..799b112 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c12e2d3 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;siBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 1281b35..0000000 --- a/lib/index.js +++ /dev/null @@ -1,60 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index fbf36ea..eec2fca 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,57 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "github:stdlib-js/array-base-assert-contains#main", - "@stdlib/array-base-assert-is-accessor-array": "^0.0.1", - "@stdlib/utils-define-read-only-property": "^0.0.8" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.0.1", - "@stdlib/array-base-accessor-getter": "^0.0.1", - "@stdlib/array-base-getter": "^0.0.1", - "@stdlib/array-base-ones": "^0.0.2", - "@stdlib/array-complex128": "^0.0.6", - "@stdlib/array-complex64": "^0.0.6", - "@stdlib/array-dtype": "^0.0.6", - "@stdlib/array-float32": "^0.0.6", - "@stdlib/array-float64": "^0.0.6", - "@stdlib/array-int16": "^0.0.6", - "@stdlib/array-int32": "^0.0.6", - "@stdlib/array-int8": "^0.0.6", - "@stdlib/array-uint16": "^0.0.6", - "@stdlib/array-uint32": "^0.0.6", - "@stdlib/array-uint8": "^0.0.7", - "@stdlib/array-uint8c": "^0.0.8", - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-collection": "^0.0.8", - "@stdlib/bench": "^0.0.12", - "@stdlib/buffer-alloc-unsafe": "^0.0.7", - "@stdlib/math-base-special-pow": "^0.0.7", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2", - "@stdlib/utils-constructor-name": "^0.0.8", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-keys": "^0.0.7", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..2b2f5b2 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 202d6019ba8f9bb8cea29c4f5416584c07c1ecf1 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 19 Aug 2023 01:31:07 +0000 Subject: [PATCH 017/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 51310d2..6ee1ab7 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@stdlib/bench": "^0.0.12", "@stdlib/buffer-alloc-unsafe": "^0.0.7", "@stdlib/math-base-special-pow": "^0.0.7", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/utils-constructor-name": "^0.0.8", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", "@stdlib/utils-keys": "^0.0.7", From 4e25d8f82b459e74d68477382ee3faf4a13442e4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 19 Aug 2023 01:32:33 +0000 Subject: [PATCH 018/208] Remove files --- index.d.ts | 83 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6265 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index dfcf79d..0000000 --- a/index.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( `@stdlib/array/complex128` ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 799b112..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c12e2d3..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;siBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 2b2f5b2..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 9b4085f35f9609c444f52680b9b39e9694bc8e1c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 19 Aug 2023 01:33:32 +0000 Subject: [PATCH 019/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 783 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 45 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 60 - package.json | 77 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 36 files changed, 6206 insertions(+), 3383 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 65333da..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 52d30ff..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 91f2b93..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,783 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v2 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -112,7 +111,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -174,9 +173,9 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 698c6bf..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 019c468..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"contains",require('@stdlib/array-base-assert-contains/dist'));e(r,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));module.exports=r; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 4814267..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAK7F,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index ed1e2f4..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* tslint:disable:no-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..b09f02b --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.0.1-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.0.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..6f9c262 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;ojBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 1281b35..0000000 --- a/lib/index.js +++ /dev/null @@ -1,60 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 6ee1ab7..eec2fca 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,57 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.0.1", - "@stdlib/array-base-assert-is-accessor-array": "^0.0.1", - "@stdlib/utils-define-read-only-property": "^0.0.8" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.0.1", - "@stdlib/array-base-accessor-getter": "^0.0.1", - "@stdlib/array-base-getter": "^0.0.1", - "@stdlib/array-base-ones": "^0.0.2", - "@stdlib/array-complex128": "^0.0.6", - "@stdlib/array-complex64": "^0.0.6", - "@stdlib/array-dtype": "^0.0.6", - "@stdlib/array-float32": "^0.0.6", - "@stdlib/array-float64": "^0.0.6", - "@stdlib/array-int16": "^0.0.6", - "@stdlib/array-int32": "^0.0.6", - "@stdlib/array-int8": "^0.0.6", - "@stdlib/array-uint16": "^0.0.6", - "@stdlib/array-uint32": "^0.0.6", - "@stdlib/array-uint8": "^0.0.7", - "@stdlib/array-uint8c": "^0.0.8", - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-collection": "^0.0.8", - "@stdlib/bench": "^0.0.12", - "@stdlib/buffer-alloc-unsafe": "^0.0.7", - "@stdlib/math-base-special-pow": "^0.0.7", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2", - "@stdlib/utils-constructor-name": "^0.0.8", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-keys": "^0.0.7", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..54e6b8f --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From f505067c7803a5e7af8be55adda09182890a764a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 24 Sep 2023 17:06:44 +0000 Subject: [PATCH 020/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bed6420..d8b7735 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@stdlib/bench": "^0.1.0", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/string-format": "^0.1.0", + "@stdlib/error-tools-fmtprodmsg": "^0.1.0", "@stdlib/utils-constructor-name": "^0.1.0", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0", "@stdlib/utils-keys": "^0.1.0", From 85ac4d4eacdec532dd7fd7aa767289585a700ee4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 24 Sep 2023 17:30:40 +0000 Subject: [PATCH 021/208] Remove files --- index.d.ts | 83 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6265 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 04b379a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( `@stdlib/array/complex128` ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index b09f02b..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.0.1-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.0.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.0.1-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 6f9c262..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;ojBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 54e6b8f..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From c6ddadbea18ad511d2f2c3d2c827024c8deb7185 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 24 Sep 2023 17:31:44 +0000 Subject: [PATCH 022/208] Auto-generated commit --- .editorconfig | 186 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 783 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 45 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 60 - package.json | 77 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 37 files changed, 6206 insertions(+), 3418 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 13e9c39..0000000 --- a/.editorconfig +++ /dev/null @@ -1,186 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 65333da..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 52d30ff..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 91f2b93..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,783 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v2 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -123,7 +122,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -185,9 +184,9 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 698c6bf..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 019c468..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"contains",require('@stdlib/array-base-assert-contains/dist'));e(r,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));module.exports=r; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 4814267..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAK7F,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index ed1e2f4..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* tslint:disable:no-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..31d602f --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.0.1-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.0.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e8f653c --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;2jBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 1281b35..0000000 --- a/lib/index.js +++ /dev/null @@ -1,60 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index d8b7735..114ff9c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,57 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.0.1", - "@stdlib/array-base-assert-is-accessor-array": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.0" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.1.0", - "@stdlib/array-base-accessor-getter": "^0.1.0", - "@stdlib/array-base-getter": "^0.1.0", - "@stdlib/array-base-ones": "^0.1.0", - "@stdlib/array-complex128": "^0.1.0", - "@stdlib/array-complex64": "^0.1.0", - "@stdlib/array-dtype": "^0.1.0", - "@stdlib/array-float32": "^0.1.0", - "@stdlib/array-float64": "^0.1.0", - "@stdlib/array-int16": "^0.1.0", - "@stdlib/array-int32": "^0.1.0", - "@stdlib/array-int8": "^0.1.0", - "@stdlib/array-uint16": "^0.1.0", - "@stdlib/array-uint32": "^0.1.0", - "@stdlib/array-uint8": "^0.1.0", - "@stdlib/array-uint8c": "^0.1.0", - "@stdlib/assert-has-own-property": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.0", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/bench": "^0.1.0", - "@stdlib/buffer-alloc-unsafe": "^0.1.0", - "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.0", - "@stdlib/utils-constructor-name": "^0.1.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..84b41bb --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 48f91e7b5479680a004b094fdd1ee3a983e9b17a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 24 Sep 2023 17:43:47 +0000 Subject: [PATCH 023/208] Update README.md for ESM bundle v0.1.0 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8615ed1..6fd5c24 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ limitations under the License. ## Usage ```javascript -import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@esm/index.mjs'; +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@v0.1.0-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { contains, isAccessorArray } from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@esm/index.mjs'; +import { contains, isAccessorArray } from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@v0.1.0-esm/index.mjs'; ``` #### ns @@ -92,7 +92,7 @@ The namespace exports the following: - - - - From 69101091970643fe5a247d629986d37e3af39f68 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 3 Oct 2023 02:35:04 +0000 Subject: [PATCH 027/208] Auto-generated commit --- .editorconfig | 186 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 247 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 45 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 60 - package.json | 77 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 40 - test/test.js | 40 - 39 files changed, 6206 insertions(+), 3517 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 13e9c39..0000000 --- a/.editorconfig +++ /dev/null @@ -1,186 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 567b096..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-10-01T05:29:51.931Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index ab56cca..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c1c45e7..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index aafd7d9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA corresponding to v3.0.3: - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 265afda..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -123,7 +122,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -185,9 +184,9 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 698c6bf..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 019c468..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"contains",require('@stdlib/array-base-assert-contains/dist'));e(r,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));module.exports=r; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 4814267..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAK7F,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index ed1e2f4..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* tslint:disable:no-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..c1559eb --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e8f653c --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;2jBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 1281b35..0000000 --- a/lib/index.js +++ /dev/null @@ -1,60 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 60aa8f2..114ff9c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,57 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.0" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.1.0", - "@stdlib/array-base-accessor-getter": "^0.1.0", - "@stdlib/array-base-getter": "^0.1.0", - "@stdlib/array-base-ones": "^0.1.0", - "@stdlib/array-complex128": "^0.1.0", - "@stdlib/array-complex64": "^0.1.0", - "@stdlib/array-dtype": "^0.1.0", - "@stdlib/array-float32": "^0.1.0", - "@stdlib/array-float64": "^0.1.0", - "@stdlib/array-int16": "^0.1.0", - "@stdlib/array-int32": "^0.1.0", - "@stdlib/array-int8": "^0.1.0", - "@stdlib/array-uint16": "^0.1.0", - "@stdlib/array-uint32": "^0.1.0", - "@stdlib/array-uint8": "^0.1.0", - "@stdlib/array-uint8c": "^0.1.0", - "@stdlib/assert-has-own-property": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.0", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/bench": "^0.1.0", - "@stdlib/buffer-alloc-unsafe": "^0.1.0", - "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.0", - "@stdlib/utils-constructor-name": "^0.1.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..b44b0c1 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index 8671fa0..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 7792a504c4879850f477e1025892f6acfc6b52ad Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 5 Oct 2023 20:10:38 +0000 Subject: [PATCH 028/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e1887fd..02e7300 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@stdlib/bench": "^0.1.0", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-constructor-name": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From eb231d5ff1ad6ad363fe3f3329da6373f8ea0182 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 7 Oct 2023 03:39:21 +0000 Subject: [PATCH 029/208] Remove files --- index.d.ts | 83 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6265 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 04b379a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( `@stdlib/array/complex128` ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index c1559eb..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index e8f653c..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;2jBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index b44b0c1..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From c868fab022a5e213423611a04b7a43909398b11b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 7 Oct 2023 03:40:22 +0000 Subject: [PATCH 030/208] Auto-generated commit --- .editorconfig | 186 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 247 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 45 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 60 - package.json | 77 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 40 - test/test.js | 40 - 38 files changed, 6206 insertions(+), 3516 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 13e9c39..0000000 --- a/.editorconfig +++ /dev/null @@ -1,186 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index ab56cca..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c1c45e7..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index aafd7d9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA corresponding to v3.0.3: - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 265afda..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -123,7 +122,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -185,9 +184,9 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 698c6bf..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 019c468..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"contains",require('@stdlib/array-base-assert-contains/dist'));e(r,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));module.exports=r; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 4814267..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAK7F,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index ed1e2f4..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* tslint:disable:no-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..da9e800 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e8f653c --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;2jBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 1281b35..0000000 --- a/lib/index.js +++ /dev/null @@ -1,60 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 02e7300..114ff9c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,57 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.1.0", - "@stdlib/array-base-accessor-getter": "^0.1.0", - "@stdlib/array-base-getter": "^0.1.0", - "@stdlib/array-base-ones": "^0.1.0", - "@stdlib/array-complex128": "^0.1.0", - "@stdlib/array-complex64": "^0.1.0", - "@stdlib/array-dtype": "^0.1.0", - "@stdlib/array-float32": "^0.1.0", - "@stdlib/array-float64": "^0.1.0", - "@stdlib/array-int16": "^0.1.0", - "@stdlib/array-int32": "^0.1.0", - "@stdlib/array-int8": "^0.1.0", - "@stdlib/array-uint16": "^0.1.0", - "@stdlib/array-uint32": "^0.1.0", - "@stdlib/array-uint8": "^0.1.0", - "@stdlib/array-uint8c": "^0.1.0", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/bench": "^0.1.0", - "@stdlib/buffer-alloc-unsafe": "^0.1.0", - "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-constructor-name": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..0894cf8 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index 8671fa0..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From f626157dc2cac9810e7fb86e2dea4be358b46721 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Nov 2023 17:53:57 +0000 Subject: [PATCH 031/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 24bdebb..53616c1 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@stdlib/bench": "^0.1.0", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-constructor-name": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From f1f692faf1060c7171e17e09436e2072b044fc6e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 02:30:54 +0000 Subject: [PATCH 032/208] Remove files --- index.d.ts | 83 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6265 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 04b379a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( `@stdlib/array/complex128` ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index da9e800..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index e8f653c..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;2jBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 0894cf8..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 6c0eb26f291a1fc514191c9e3130a4969dca8f4e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 02:31:45 +0000 Subject: [PATCH 033/208] Auto-generated commit --- .editorconfig | 186 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 45 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 60 - package.json | 77 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6206 insertions(+), 3518 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 13e9c39..0000000 --- a/.editorconfig +++ /dev/null @@ -1,186 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 8d93094..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-11-01T05:50:00.214Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index ab56cca..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c1c45e7..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index aafd7d9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA corresponding to v3.0.3: - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 265afda..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -123,7 +122,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -185,9 +184,9 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 698c6bf..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 019c468..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"contains",require('@stdlib/array-base-assert-contains/dist'));e(r,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));module.exports=r; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 4814267..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAK7F,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index ed1e2f4..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* tslint:disable:no-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..da9e800 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e8f653c --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;2jBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 1281b35..0000000 --- a/lib/index.js +++ /dev/null @@ -1,60 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 53616c1..114ff9c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,57 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.1.0", - "@stdlib/array-base-accessor-getter": "^0.1.0", - "@stdlib/array-base-getter": "^0.1.0", - "@stdlib/array-base-ones": "^0.1.0", - "@stdlib/array-complex128": "^0.1.0", - "@stdlib/array-complex64": "^0.1.0", - "@stdlib/array-dtype": "^0.1.0", - "@stdlib/array-float32": "^0.1.1", - "@stdlib/array-float64": "^0.1.1", - "@stdlib/array-int16": "^0.1.1", - "@stdlib/array-int32": "^0.1.1", - "@stdlib/array-int8": "^0.1.1", - "@stdlib/array-uint16": "^0.1.1", - "@stdlib/array-uint32": "^0.1.1", - "@stdlib/array-uint8": "^0.1.1", - "@stdlib/array-uint8c": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/bench": "^0.1.0", - "@stdlib/buffer-alloc-unsafe": "^0.1.0", - "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-constructor-name": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..7eae6d1 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 604e5c0306e611df9dcb4630fc00b4a436d7892e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 20:45:17 +0000 Subject: [PATCH 034/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 24bdebb..53616c1 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@stdlib/bench": "^0.1.0", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-constructor-name": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From 36b375b8beb13078c9edbc6ace57c618d91ce4b7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 22:47:23 +0000 Subject: [PATCH 035/208] Remove files --- index.d.ts | 83 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6265 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 04b379a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( `@stdlib/array/complex128` ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index da9e800..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index e8f653c..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;2jBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 7eae6d1..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 7b5f91b368d46402cfb921d2711dc12d7ffbf668 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 22:48:26 +0000 Subject: [PATCH 036/208] Auto-generated commit --- .editorconfig | 186 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 45 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 60 - package.json | 77 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6206 insertions(+), 3517 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 13e9c39..0000000 --- a/.editorconfig +++ /dev/null @@ -1,186 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index ab56cca..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c1c45e7..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index aafd7d9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA corresponding to v3.0.3: - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 265afda..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -123,7 +122,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -185,9 +184,9 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 698c6bf..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 019c468..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"contains",require('@stdlib/array-base-assert-contains/dist'));e(r,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));module.exports=r; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 4814267..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAK7F,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index ed1e2f4..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* tslint:disable:no-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..da9e800 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e8f653c --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;2jBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 1281b35..0000000 --- a/lib/index.js +++ /dev/null @@ -1,60 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 53616c1..114ff9c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,57 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.1.0", - "@stdlib/array-base-accessor-getter": "^0.1.0", - "@stdlib/array-base-getter": "^0.1.0", - "@stdlib/array-base-ones": "^0.1.0", - "@stdlib/array-complex128": "^0.1.0", - "@stdlib/array-complex64": "^0.1.0", - "@stdlib/array-dtype": "^0.1.0", - "@stdlib/array-float32": "^0.1.1", - "@stdlib/array-float64": "^0.1.1", - "@stdlib/array-int16": "^0.1.1", - "@stdlib/array-int32": "^0.1.1", - "@stdlib/array-int8": "^0.1.1", - "@stdlib/array-uint16": "^0.1.1", - "@stdlib/array-uint32": "^0.1.1", - "@stdlib/array-uint8": "^0.1.1", - "@stdlib/array-uint8c": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/bench": "^0.1.0", - "@stdlib/buffer-alloc-unsafe": "^0.1.0", - "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-constructor-name": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..5c54630 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 0294b8ac87484ee83368e7752131070bc6b4d322 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 12 Nov 2023 21:22:03 +0000 Subject: [PATCH 037/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 829a6a3..a9bf0c9 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@stdlib/bench": "^0.2.0", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-constructor-name": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From b3de9b99ae242e15f6691dab88da8ac8a9c05c12 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 12 Nov 2023 21:47:57 +0000 Subject: [PATCH 038/208] Remove files --- index.d.ts | 82 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6264 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index befc405..0000000 --- a/index.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( `@stdlib/array/complex128` ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index da9e800..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index e8f653c..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;2jBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 5c54630..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 8735381534437af845f337ce04a6b9f3433f2281 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 12 Nov 2023 21:48:48 +0000 Subject: [PATCH 039/208] Auto-generated commit --- .editorconfig | 186 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 45 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 60 - package.json | 77 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6206 insertions(+), 3517 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 13e9c39..0000000 --- a/.editorconfig +++ /dev/null @@ -1,186 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index ab56cca..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c1c45e7..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index aafd7d9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA corresponding to v3.0.3: - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 265afda..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -123,7 +122,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -185,9 +184,9 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 698c6bf..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 019c468..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"contains",require('@stdlib/array-base-assert-contains/dist'));e(r,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));module.exports=r; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 4814267..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAK7F,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..da9e800 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e8f653c --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;2jBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 1281b35..0000000 --- a/lib/index.js +++ /dev/null @@ -1,60 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index a9bf0c9..114ff9c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,57 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.1.0", - "@stdlib/array-base-accessor-getter": "^0.1.0", - "@stdlib/array-base-getter": "^0.1.0", - "@stdlib/array-base-ones": "^0.1.0", - "@stdlib/array-complex128": "^0.1.0", - "@stdlib/array-complex64": "^0.1.0", - "@stdlib/array-dtype": "^0.1.0", - "@stdlib/array-float32": "^0.1.1", - "@stdlib/array-float64": "^0.1.1", - "@stdlib/array-int16": "^0.1.1", - "@stdlib/array-int32": "^0.1.1", - "@stdlib/array-int8": "^0.1.1", - "@stdlib/array-uint16": "^0.1.1", - "@stdlib/array-uint32": "^0.1.1", - "@stdlib/array-uint8": "^0.1.1", - "@stdlib/array-uint8c": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/bench": "^0.2.0", - "@stdlib/buffer-alloc-unsafe": "^0.1.0", - "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-constructor-name": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..a4b5b62 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From c46eed9ba04f5bb9539a95b29e8ae9282339ef8b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Dec 2023 14:01:43 +0000 Subject: [PATCH 040/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 128ce22..b2b9dab 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@stdlib/bench": "^0.2.1", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-constructor-name": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From 2707bde47527675e3e8a0c4bcad088f7a8e2efe6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Dec 2023 12:14:42 +0000 Subject: [PATCH 041/208] Remove files --- index.d.ts | 82 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6264 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index befc405..0000000 --- a/index.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( `@stdlib/array/complex128` ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index da9e800..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index e8f653c..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;2jBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index a4b5b62..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 3a09aa2341c5fd94f868a249105f1d2a3a499877 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Dec 2023 12:15:23 +0000 Subject: [PATCH 042/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 45 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 60 - package.json | 77 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6206 insertions(+), 3513 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 881939e..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-12-01T05:55:09.945Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index ab56cca..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c1c45e7..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index aafd7d9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA corresponding to v3.0.3: - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 265afda..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -123,7 +122,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -185,9 +184,9 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 698c6bf..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 019c468..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"contains",require('@stdlib/array-base-assert-contains/dist'));e(r,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));module.exports=r; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 4814267..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAK7F,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..da9e800 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e8f653c --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;2jBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 1281b35..0000000 --- a/lib/index.js +++ /dev/null @@ -1,60 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index b2b9dab..114ff9c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,57 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.1.0", - "@stdlib/array-base-accessor-getter": "^0.1.0", - "@stdlib/array-base-getter": "^0.1.0", - "@stdlib/array-base-ones": "^0.1.0", - "@stdlib/array-complex128": "^0.1.0", - "@stdlib/array-complex64": "^0.1.0", - "@stdlib/array-dtype": "^0.1.0", - "@stdlib/array-float32": "^0.1.1", - "@stdlib/array-float64": "^0.1.1", - "@stdlib/array-int16": "^0.1.1", - "@stdlib/array-int32": "^0.1.1", - "@stdlib/array-int8": "^0.1.1", - "@stdlib/array-uint16": "^0.1.1", - "@stdlib/array-uint32": "^0.1.1", - "@stdlib/array-uint8": "^0.1.1", - "@stdlib/array-uint8c": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/bench": "^0.2.1", - "@stdlib/buffer-alloc-unsafe": "^0.1.0", - "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-constructor-name": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..7f005ba --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 05362a3766ee7aaeca128d61ab627aa3d46e1fe9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Jan 2024 08:23:43 +0000 Subject: [PATCH 043/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f462cd6..cb5e890 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "@stdlib/assert-is-collection": "^0.1.0", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-constructor-name": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From 9d113fd9a0a3b8650d6fbb18725077cec766cd28 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Jan 2024 15:03:23 +0000 Subject: [PATCH 044/208] Remove files --- index.d.ts | 82 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6264 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index befc405..0000000 --- a/index.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( `@stdlib/array/complex128` ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index da9e800..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index e8f653c..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;2jBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 7f005ba..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From bab87038b751b6a4dfac33f55b3930a67b252e5b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Jan 2024 15:03:45 +0000 Subject: [PATCH 045/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 228 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 45 +- SECURITY.md | 5 - branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 60 - package.json | 77 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 6206 insertions(+), 3519 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index c70779f..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-01-01T05:25:14.891Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 30656c4..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c92f5c4..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index e39692f..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index e1e3539..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -123,7 +122,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -185,9 +184,9 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 698c6bf..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 019c468..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"contains",require('@stdlib/array-base-assert-contains/dist'));e(r,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));module.exports=r; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 4814267..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAK7F,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..3e35134 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e8f653c --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;2jBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 1281b35..0000000 --- a/lib/index.js +++ /dev/null @@ -1,60 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index cb5e890..114ff9c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,57 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.1.0", - "@stdlib/array-base-accessor-getter": "^0.1.0", - "@stdlib/array-base-getter": "^0.1.0", - "@stdlib/array-base-ones": "^0.1.0", - "@stdlib/array-complex128": "^0.1.0", - "@stdlib/array-complex64": "^0.1.0", - "@stdlib/array-dtype": "^0.1.0", - "@stdlib/array-float32": "^0.1.1", - "@stdlib/array-float64": "^0.1.1", - "@stdlib/array-int16": "^0.1.1", - "@stdlib/array-int32": "^0.1.1", - "@stdlib/array-int8": "^0.1.1", - "@stdlib/array-uint16": "^0.1.1", - "@stdlib/array-uint32": "^0.1.1", - "@stdlib/array-uint8": "^0.1.1", - "@stdlib/array-uint8c": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/buffer-alloc-unsafe": "^0.1.0", - "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-constructor-name": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..b1dde3e --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From fc944a14568e579bc2c191c186fa797de730fdc9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 7 Jan 2024 22:04:52 +0000 Subject: [PATCH 046/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f462cd6..cb5e890 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "@stdlib/assert-is-collection": "^0.1.0", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-constructor-name": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From d0ce2529ef8afad4220006d645934f40ba15f170 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 7 Jan 2024 22:15:47 +0000 Subject: [PATCH 047/208] Remove files --- index.d.ts | 82 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6264 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index befc405..0000000 --- a/index.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( `@stdlib/array/complex128` ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 3e35134..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index e8f653c..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;2jBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index b1dde3e..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From fe93dbc9f5c02fe6faf28abf232ed616432bb2e9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 7 Jan 2024 22:16:03 +0000 Subject: [PATCH 048/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 228 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 45 +- SECURITY.md | 5 - branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 60 - package.json | 77 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6206 insertions(+), 3518 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 30656c4..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c92f5c4..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index e39692f..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index e1e3539..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -123,7 +122,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -185,9 +184,9 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 698c6bf..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 019c468..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"contains",require('@stdlib/array-base-assert-contains/dist'));e(r,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));module.exports=r; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 4814267..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAK7F,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..3e35134 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e8f653c --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;2jBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 1281b35..0000000 --- a/lib/index.js +++ /dev/null @@ -1,60 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index cb5e890..114ff9c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,57 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.1.0", - "@stdlib/array-base-accessor-getter": "^0.1.0", - "@stdlib/array-base-getter": "^0.1.0", - "@stdlib/array-base-ones": "^0.1.0", - "@stdlib/array-complex128": "^0.1.0", - "@stdlib/array-complex64": "^0.1.0", - "@stdlib/array-dtype": "^0.1.0", - "@stdlib/array-float32": "^0.1.1", - "@stdlib/array-float64": "^0.1.1", - "@stdlib/array-int16": "^0.1.1", - "@stdlib/array-int32": "^0.1.1", - "@stdlib/array-int8": "^0.1.1", - "@stdlib/array-uint16": "^0.1.1", - "@stdlib/array-uint32": "^0.1.1", - "@stdlib/array-uint8": "^0.1.1", - "@stdlib/array-uint8c": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/buffer-alloc-unsafe": "^0.1.0", - "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-constructor-name": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..6b79542 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 2585b97b1adc9b4ba5caa32f4ed5c831080b7d7c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 14 Jan 2024 07:14:17 +0000 Subject: [PATCH 049/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 84a51a3..48b99d2 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@stdlib/assert-is-collection": "^0.1.0", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-constructor-name": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From bcfea5d0b8f92fd99228b9017d860b060f09e75e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 14 Jan 2024 07:14:48 +0000 Subject: [PATCH 050/208] Remove files --- index.d.ts | 82 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6264 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 2cac628..0000000 --- a/index.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 3e35134..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e);export{t as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index e8f653c..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray"],"mappings":";;2jBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 6b79542..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 881b20b321108df4f96bdd18955ed5b3683af199 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 14 Jan 2024 07:15:15 +0000 Subject: [PATCH 051/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 228 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 45 +- SECURITY.md | 5 - branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 69 - package.json | 78 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6206 insertions(+), 3528 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 30656c4..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c92f5c4..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index e39692f..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index e1e3539..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -123,7 +122,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -185,9 +184,9 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 698c6bf..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 1ab9a69..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"contains",require('@stdlib/array-base-assert-contains/dist'));e(r,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));e(r,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));module.exports=r; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index d14ae15..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAK9F,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..3ec39a9 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e),s(t,"isComplex64Array",a);export{t as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..15bcd7a --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray","isComplex64Array"],"mappings":";;myBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index f5840ce..0000000 --- a/lib/index.js +++ /dev/null @@ -1,69 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 48b99d2..114ff9c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,58 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.1.0", - "@stdlib/array-base-assert-is-complex64array": "github:stdlib-js/array-base-assert-is-complex64array#main", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.1.0", - "@stdlib/array-base-accessor-getter": "^0.1.0", - "@stdlib/array-base-getter": "^0.1.0", - "@stdlib/array-base-ones": "^0.1.0", - "@stdlib/array-complex128": "^0.1.0", - "@stdlib/array-complex64": "^0.1.0", - "@stdlib/array-dtype": "^0.1.0", - "@stdlib/array-float32": "^0.1.1", - "@stdlib/array-float64": "^0.1.1", - "@stdlib/array-int16": "^0.1.1", - "@stdlib/array-int32": "^0.1.1", - "@stdlib/array-int8": "^0.1.1", - "@stdlib/array-uint16": "^0.1.1", - "@stdlib/array-uint32": "^0.1.1", - "@stdlib/array-uint8": "^0.1.1", - "@stdlib/array-uint8c": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/buffer-alloc-unsafe": "^0.1.0", - "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-constructor-name": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..230de3e --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From a7ef42ca71ec8c4b41b2dae4c95a3c9dc82514a6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 14 Jan 2024 07:23:50 +0000 Subject: [PATCH 052/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 31ec8f3..3bdd026 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@stdlib/assert-is-collection": "^0.1.0", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-constructor-name": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From 38d32e28d0b621f72c58994dea24d432d7f096e4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 14 Jan 2024 07:24:23 +0000 Subject: [PATCH 053/208] Remove files --- index.d.ts | 82 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6264 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 2cac628..0000000 --- a/index.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 3ec39a9..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@esm/index.mjs";var t={};s(t,"contains",r),s(t,"isAccessorArray",e),s(t,"isComplex64Array",a);export{t as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 15bcd7a..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray","isComplex64Array"],"mappings":";;myBAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 230de3e..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 49dd1ae114f97dbbb8ebacf2324272eb9d507bcf Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 14 Jan 2024 07:24:48 +0000 Subject: [PATCH 054/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 228 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 45 +- SECURITY.md | 5 - branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 78 - package.json | 79 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6206 insertions(+), 3538 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 30656c4..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c92f5c4..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index e39692f..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index e1e3539..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -123,7 +122,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -185,9 +184,9 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 698c6bf..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index f6be0d1..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"contains",require('@stdlib/array-base-assert-contains/dist'));e(r,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));e(r,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));e(r,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));module.exports=r; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 12e6351..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAKhG,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..7eb0fae --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@esm/index.mjs";var i={};s(i,"contains",r),s(i,"isAccessorArray",e),s(i,"isComplex64Array",a),s(i,"isComplex128Array",t);export{i as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..888d185 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray","isComplex64Array","isComplex128Array"],"mappings":";;2+BAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,oBAAAK"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index ad66325..0000000 --- a/lib/index.js +++ /dev/null @@ -1,78 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 3bdd026..114ff9c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,59 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.1.0", - "@stdlib/array-base-assert-is-complex128array": "github:stdlib-js/array-base-assert-is-complex128array#main", - "@stdlib/array-base-assert-is-complex64array": "github:stdlib-js/array-base-assert-is-complex64array#main", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.1.0", - "@stdlib/array-base-accessor-getter": "^0.1.0", - "@stdlib/array-base-getter": "^0.1.0", - "@stdlib/array-base-ones": "^0.1.0", - "@stdlib/array-complex128": "^0.1.0", - "@stdlib/array-complex64": "^0.1.0", - "@stdlib/array-dtype": "^0.1.0", - "@stdlib/array-float32": "^0.1.1", - "@stdlib/array-float64": "^0.1.1", - "@stdlib/array-int16": "^0.1.1", - "@stdlib/array-int32": "^0.1.1", - "@stdlib/array-int8": "^0.1.1", - "@stdlib/array-uint16": "^0.1.1", - "@stdlib/array-uint32": "^0.1.1", - "@stdlib/array-uint8": "^0.1.1", - "@stdlib/array-uint8c": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/buffer-alloc-unsafe": "^0.1.0", - "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-constructor-name": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..bca96a0 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 1058101761357b2eb5196302b2fefb0d1ddfb5e4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 17 Jan 2024 05:16:00 +0000 Subject: [PATCH 055/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0d17bb3..c680650 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "@stdlib/random-array-discrete-uniform": "^0.1.0", "@stdlib/strided-base-reinterpret-complex128": "^0.1.1", "@stdlib/strided-base-reinterpret-complex64": "^0.1.1", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-constructor-name": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From c97d17f90a21aeecd21f9dcf46ed6c510ab2dfdc Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 17 Jan 2024 05:18:33 +0000 Subject: [PATCH 056/208] Remove files --- index.d.ts | 82 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6264 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 2cac628..0000000 --- a/index.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 7eb0fae..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@esm/index.mjs";var i={};s(i,"contains",r),s(i,"isAccessorArray",e),s(i,"isComplex64Array",a),s(i,"isComplex128Array",t);export{i as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 888d185..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","isAccessorArray","isComplex64Array","isComplex128Array"],"mappings":";;2+BAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,oBAAAK"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index bca96a0..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 7a50c822152012f5e7c54fc600bdcbb5c049d803 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 17 Jan 2024 05:18:54 +0000 Subject: [PATCH 057/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 228 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 45 +- SECURITY.md | 5 - branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 87 - package.json | 86 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6206 insertions(+), 3554 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 30656c4..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c92f5c4..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index e39692f..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index e1e3539..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -123,7 +122,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -185,9 +184,9 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 698c6bf..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 51a007d..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"contains",require('@stdlib/array-base-assert-contains/dist'));e(r,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));e(r,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));e(r,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));e(r,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));module.exports=r; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 4994ff0..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAKhG,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..6119353 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.1.0-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.1.0-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.1.0-esm/index.mjs";var d={};s(d,"contains",e),s(d,"hasSameValues",r),s(d,"isAccessorArray",a),s(d,"isComplex64Array",t),s(d,"isComplex128Array",i);export{d as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c712aae --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplex64Array","isComplex128Array"],"mappings":";;2wCAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,mBAAAK,GAUAJ,EAAAD,EAAA,oBAAAM"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index fe1ef5b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,87 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index c680650..114ff9c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,66 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-assert-has-same-values": "github:stdlib-js/array-base-assert-has-same-values#main", - "@stdlib/array-base-assert-is-accessor-array": "^0.1.0", - "@stdlib/array-base-assert-is-complex128array": "^0.1.0", - "@stdlib/array-base-assert-is-complex64array": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.1.0", - "@stdlib/array-base-accessor-getter": "^0.1.0", - "@stdlib/array-base-arraylike2object": "^0.1.0", - "@stdlib/array-base-getter": "^0.1.0", - "@stdlib/array-base-ones": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/array-complex128": "^0.1.0", - "@stdlib/array-complex64": "^0.1.0", - "@stdlib/array-dtype": "^0.1.0", - "@stdlib/array-float32": "^0.1.1", - "@stdlib/array-float64": "^0.1.1", - "@stdlib/array-int16": "^0.1.1", - "@stdlib/array-int32": "^0.1.1", - "@stdlib/array-int8": "^0.1.1", - "@stdlib/array-uint16": "^0.1.1", - "@stdlib/array-uint32": "^0.1.1", - "@stdlib/array-uint8": "^0.1.1", - "@stdlib/array-uint8c": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-same-value": "^0.1.1", - "@stdlib/buffer-alloc-unsafe": "^0.1.0", - "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/random-array-discrete-uniform": "^0.1.0", - "@stdlib/strided-base-reinterpret-complex128": "^0.1.1", - "@stdlib/strided-base-reinterpret-complex64": "^0.1.1", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-constructor-name": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..51f5270 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From a838a30e44b627535bf5946b699baec9782d6301 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 26 Jan 2024 02:51:35 +0000 Subject: [PATCH 058/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a9846e2..67973df 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "@stdlib/random-array-discrete-uniform": "^0.1.0", "@stdlib/strided-base-reinterpret-complex128": "^0.1.1", "@stdlib/strided-base-reinterpret-complex64": "^0.1.1", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-constructor-name": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From 24c592b1fb3dd16b82ef82c56fad55c8b677ff82 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 26 Jan 2024 02:52:02 +0000 Subject: [PATCH 059/208] Remove files --- index.d.ts | 82 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6264 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 2cac628..0000000 --- a/index.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 6119353..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.1.0-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.1.0-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.1.0-esm/index.mjs";var d={};s(d,"contains",e),s(d,"hasSameValues",r),s(d,"isAccessorArray",a),s(d,"isComplex64Array",t),s(d,"isComplex128Array",i);export{d as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c712aae..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplex64Array","isComplex128Array"],"mappings":";;2wCAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,mBAAAK,GAUAJ,EAAAD,EAAA,oBAAAM"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 51f5270..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 15123ab8bbe7d097bc41a95489bb78881e2580d8 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 26 Jan 2024 02:53:12 +0000 Subject: [PATCH 060/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 228 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 53 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 87 - package.json | 86 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6209 insertions(+), 3562 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 30656c4..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c92f5c4..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index e39692f..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index e1e3539..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -128,7 +125,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -193,15 +190,15 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 51a007d..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"contains",require('@stdlib/array-base-assert-contains/dist'));e(r,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));e(r,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));e(r,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));e(r,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));module.exports=r; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 4994ff0..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAKhG,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..5c0feb3 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.1.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.1.0-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.1.0-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.1.0-esm/index.mjs";var d={};s(d,"contains",e),s(d,"hasSameValues",r),s(d,"isAccessorArray",a),s(d,"isComplex64Array",t),s(d,"isComplex128Array",i);export{d as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..3424872 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplex64Array","isComplex128Array"],"mappings":";;yxCAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,mBAAAK,GAUAJ,EAAAD,EAAA,oBAAAM"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index fe1ef5b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,87 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 67973df..114ff9c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,66 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-assert-has-same-values": "^0.1.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.1.0", - "@stdlib/array-base-assert-is-complex128array": "^0.1.0", - "@stdlib/array-base-assert-is-complex64array": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.1.0", - "@stdlib/array-base-accessor-getter": "^0.1.0", - "@stdlib/array-base-arraylike2object": "^0.1.0", - "@stdlib/array-base-getter": "^0.1.0", - "@stdlib/array-base-ones": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/array-complex128": "^0.1.0", - "@stdlib/array-complex64": "^0.1.0", - "@stdlib/array-dtype": "^0.1.0", - "@stdlib/array-float32": "^0.1.1", - "@stdlib/array-float64": "^0.1.1", - "@stdlib/array-int16": "^0.1.1", - "@stdlib/array-int32": "^0.1.1", - "@stdlib/array-int8": "^0.1.1", - "@stdlib/array-uint16": "^0.1.1", - "@stdlib/array-uint32": "^0.1.1", - "@stdlib/array-uint8": "^0.1.1", - "@stdlib/array-uint8c": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-same-value": "^0.1.1", - "@stdlib/buffer-alloc-unsafe": "^0.1.0", - "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/random-array-discrete-uniform": "^0.1.0", - "@stdlib/strided-base-reinterpret-complex128": "^0.1.1", - "@stdlib/strided-base-reinterpret-complex64": "^0.1.1", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-constructor-name": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..73d18e9 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From a03e0c87f6226ad43865092b47fa07802e55a589 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 28 Jan 2024 08:04:13 +0000 Subject: [PATCH 061/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a9846e2..67973df 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "@stdlib/random-array-discrete-uniform": "^0.1.0", "@stdlib/strided-base-reinterpret-complex128": "^0.1.1", "@stdlib/strided-base-reinterpret-complex64": "^0.1.1", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-constructor-name": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From c790e50880992e06303ba7fe3c064f320692de3a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 28 Jan 2024 08:15:28 +0000 Subject: [PATCH 062/208] Remove files --- index.d.ts | 82 - index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6264 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 2cac628..0000000 --- a/index.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 5c0feb3..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.1.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.1.0-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.1.0-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.1.0-esm/index.mjs";var d={};s(d,"contains",e),s(d,"hasSameValues",r),s(d,"isAccessorArray",a),s(d,"isComplex64Array",t),s(d,"isComplex128Array",i);export{d as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 3424872..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplex64Array","isComplex128Array"],"mappings":";;yxCAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,mBAAAK,GAUAJ,EAAAD,EAAA,oBAAAM"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 73d18e9..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From a6d3863bf7dfbb9b430e4bf1cfe432f79dd3f6aa Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 28 Jan 2024 08:16:08 +0000 Subject: [PATCH 063/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 228 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 53 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 87 - package.json | 86 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6209 insertions(+), 3562 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 30656c4..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c92f5c4..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index e39692f..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index e1e3539..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -128,7 +125,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -193,15 +190,15 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 51a007d..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"contains",require('@stdlib/array-base-assert-contains/dist'));e(r,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));e(r,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));e(r,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));e(r,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));module.exports=r; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 4994ff0..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAKhG,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..5c0feb3 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.1.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.1.0-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.1.0-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.1.0-esm/index.mjs";var d={};s(d,"contains",e),s(d,"hasSameValues",r),s(d,"isAccessorArray",a),s(d,"isComplex64Array",t),s(d,"isComplex128Array",i);export{d as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..3424872 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplex64Array","isComplex128Array"],"mappings":";;yxCAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,mBAAAK,GAUAJ,EAAAD,EAAA,oBAAAM"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index fe1ef5b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,87 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 67973df..114ff9c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,66 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-assert-has-same-values": "^0.1.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.1.0", - "@stdlib/array-base-assert-is-complex128array": "^0.1.0", - "@stdlib/array-base-assert-is-complex64array": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.1.0", - "@stdlib/array-base-accessor-getter": "^0.1.0", - "@stdlib/array-base-arraylike2object": "^0.1.0", - "@stdlib/array-base-getter": "^0.1.0", - "@stdlib/array-base-ones": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/array-complex128": "^0.1.0", - "@stdlib/array-complex64": "^0.1.0", - "@stdlib/array-dtype": "^0.1.0", - "@stdlib/array-float32": "^0.1.1", - "@stdlib/array-float64": "^0.1.1", - "@stdlib/array-int16": "^0.1.1", - "@stdlib/array-int32": "^0.1.1", - "@stdlib/array-int8": "^0.1.1", - "@stdlib/array-uint16": "^0.1.1", - "@stdlib/array-uint32": "^0.1.1", - "@stdlib/array-uint8": "^0.1.1", - "@stdlib/array-uint8c": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-same-value": "^0.1.1", - "@stdlib/buffer-alloc-unsafe": "^0.1.0", - "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/random-array-discrete-uniform": "^0.1.0", - "@stdlib/strided-base-reinterpret-complex128": "^0.1.1", - "@stdlib/strided-base-reinterpret-complex64": "^0.1.1", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-constructor-name": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..3d331ec --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From b878535fea5efc2e5dfeaedc064479c3205096a1 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 7 Feb 2024 05:45:20 +0000 Subject: [PATCH 064/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 501f8f5..58ff129 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/random-array-discrete-uniform": "^0.1.0", "@stdlib/strided-base-reinterpret-complex128": "^0.1.1", "@stdlib/strided-base-reinterpret-complex64": "^0.1.1", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-constructor-name": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-keys": "^0.1.0", From a95c8f29a401cee44355e3267c76c07fbb20ac95 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 7 Feb 2024 05:46:37 +0000 Subject: [PATCH 065/208] Remove files --- index.d.ts | 143 -- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6325 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index c9a109e..0000000 --- a/index.d.ts +++ /dev/null @@ -1,143 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 5c0feb3..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.1.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.1.0-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.1.0-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.1.0-esm/index.mjs";var d={};s(d,"contains",e),s(d,"hasSameValues",r),s(d,"isAccessorArray",a),s(d,"isComplex64Array",t),s(d,"isComplex128Array",i);export{d as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 3424872..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplex64Array","isComplex128Array"],"mappings":";;yxCAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,mBAAAK,GAUAJ,EAAAD,EAAA,oBAAAM"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 3d331ec..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 33194ea53d64be71ca0b220ec4cc388bd855753e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 7 Feb 2024 05:47:27 +0000 Subject: [PATCH 066/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 132 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 228 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 53 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 195 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6209 insertions(+), 3691 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 243b9d2..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 9106b5d..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -128,7 +125,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -193,15 +190,15 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 5127614..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index b0699a6..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..6b5f971 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.1.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.1.0-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.1.0-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@esm/index.mjs";var x={};s(x,"contains",e),s(x,"hasSameValues",t),s(x,"isAccessorArray",a),s(x,"isComplexFloatingPointDataType",r),s(x,"isComplex64Array",i),s(x,"isComplex128Array",d),s(x,"isDataType",n),s(x,"isFloatingPointDataType",m),s(x,"isIntegerDataType",p),s(x,"isMostlySafeDataTypeCast",l),s(x,"isNumericDataType",o),s(x,"isRealDataType",j),s(x,"isRealFloatingPointDataType",y),s(x,"isSafeDataTypeCast",h),s(x,"isSameKindDataTypeCast",b),s(x,"isSignedIntegerDataType",f),s(x,"isUnsignedIntegerDataType",g);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..80a3216 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplexFloatingPointDataType","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;6uIAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,iCAAAK,GAUAJ,EAAAD,EAAA,mBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,aAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,2BAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,iBAAAa,GAUAZ,EAAAD,EAAA,8BAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,4BAAAkB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index e26f071..0000000 --- a/lib/index.js +++ /dev/null @@ -1,195 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 58ff129..114ff9c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-assert-has-same-values": "^0.1.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.1.0", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "github:stdlib-js/array-base-assert-is-complex-floating-point-data-type#main", - "@stdlib/array-base-assert-is-complex128array": "^0.1.0", - "@stdlib/array-base-assert-is-complex64array": "^0.1.0", - "@stdlib/array-base-assert-is-data-type": "github:stdlib-js/array-base-assert-is-data-type#main", - "@stdlib/array-base-assert-is-floating-point-data-type": "github:stdlib-js/array-base-assert-is-floating-point-data-type#main", - "@stdlib/array-base-assert-is-integer-data-type": "github:stdlib-js/array-base-assert-is-integer-data-type#main", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "github:stdlib-js/array-base-assert-is-mostly-safe-data-type-cast#main", - "@stdlib/array-base-assert-is-numeric-data-type": "github:stdlib-js/array-base-assert-is-numeric-data-type#main", - "@stdlib/array-base-assert-is-real-data-type": "github:stdlib-js/array-base-assert-is-real-data-type#main", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "github:stdlib-js/array-base-assert-is-real-floating-point-data-type#main", - "@stdlib/array-base-assert-is-safe-data-type-cast": "github:stdlib-js/array-base-assert-is-safe-data-type-cast#main", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "github:stdlib-js/array-base-assert-is-same-kind-data-type-cast#main", - "@stdlib/array-base-assert-is-signed-integer-data-type": "github:stdlib-js/array-base-assert-is-signed-integer-data-type#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "github:stdlib-js/array-base-assert-is-unsigned-integer-data-type#main", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.1.0", - "@stdlib/array-base-accessor-getter": "^0.1.0", - "@stdlib/array-base-arraylike2object": "^0.1.0", - "@stdlib/array-base-getter": "^0.1.0", - "@stdlib/array-base-ones": "^0.1.0", - "@stdlib/array-base-zeros": "^0.1.1", - "@stdlib/array-cartesian-square": "github:stdlib-js/array-cartesian-square#main", - "@stdlib/array-complex128": "^0.1.0", - "@stdlib/array-complex64": "^0.1.0", - "@stdlib/array-dtype": "^0.1.0", - "@stdlib/array-dtypes": "^0.1.0", - "@stdlib/array-float32": "^0.1.1", - "@stdlib/array-float64": "^0.1.1", - "@stdlib/array-int16": "^0.1.1", - "@stdlib/array-int32": "^0.1.1", - "@stdlib/array-int8": "^0.1.1", - "@stdlib/array-mostly-safe-casts": "github:stdlib-js/array-mostly-safe-casts#main", - "@stdlib/array-safe-casts": "^0.1.0", - "@stdlib/array-same-kind-casts": "^0.1.0", - "@stdlib/array-uint16": "^0.1.1", - "@stdlib/array-uint32": "^0.1.1", - "@stdlib/array-uint8": "^0.1.1", - "@stdlib/array-uint8c": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-same-value": "^0.1.1", - "@stdlib/buffer-alloc-unsafe": "^0.1.0", - "@stdlib/math-base-special-pow": "^0.1.0", - "@stdlib/random-array-discrete-uniform": "^0.1.0", - "@stdlib/strided-base-reinterpret-complex128": "^0.1.1", - "@stdlib/strided-base-reinterpret-complex64": "^0.1.1", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-constructor-name": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..a00803b --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 65343bb4c94ce8c4c91725c96d1bdd4c938ea146 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 15 Feb 2024 02:50:12 +0000 Subject: [PATCH 067/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 678f213..0c6a368 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/random-array-discrete-uniform": "^0.1.0", "@stdlib/strided-base-reinterpret-complex128": "^0.2.0", "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", - "@stdlib/string-format": "^0.2.0", + "@stdlib/error-tools-fmtprodmsg": "^0.2.0", "@stdlib/utils-constructor-name": "^0.2.0", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.0", "@stdlib/utils-keys": "^0.2.0", From 545eaf96709741e463cfb3ed4a17ff093d1db20c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 15 Feb 2024 06:29:33 +0000 Subject: [PATCH 068/208] Remove files --- index.d.ts | 143 -- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6325 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index c9a109e..0000000 --- a/index.d.ts +++ /dev/null @@ -1,143 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 6b5f971..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.1.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.1.0-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.1.0-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@esm/index.mjs";var x={};s(x,"contains",e),s(x,"hasSameValues",t),s(x,"isAccessorArray",a),s(x,"isComplexFloatingPointDataType",r),s(x,"isComplex64Array",i),s(x,"isComplex128Array",d),s(x,"isDataType",n),s(x,"isFloatingPointDataType",m),s(x,"isIntegerDataType",p),s(x,"isMostlySafeDataTypeCast",l),s(x,"isNumericDataType",o),s(x,"isRealDataType",j),s(x,"isRealFloatingPointDataType",y),s(x,"isSafeDataTypeCast",h),s(x,"isSameKindDataTypeCast",b),s(x,"isSignedIntegerDataType",f),s(x,"isUnsignedIntegerDataType",g);export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 80a3216..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplexFloatingPointDataType","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;6uIAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,iCAAAK,GAUAJ,EAAAD,EAAA,mBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,aAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,2BAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,iBAAAa,GAUAZ,EAAAD,EAAA,8BAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,4BAAAkB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index a00803b..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 2517d9b64db75cf28808db425758e88709f22a82 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 15 Feb 2024 06:30:37 +0000 Subject: [PATCH 069/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 132 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 228 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 53 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 195 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6209 insertions(+), 3691 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 243b9d2..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 9106b5d..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -128,7 +125,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -193,15 +190,15 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 5127614..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index b0699a6..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..e891efe --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.1.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.0-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.0-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var g={};s(g,"contains",e),s(g,"hasSameValues",t),s(g,"isAccessorArray",a),s(g,"isComplexFloatingPointDataType",r),s(g,"isComplex64Array",i),s(g,"isComplex128Array",d),s(g,"isDataType",n),s(g,"isFloatingPointDataType",m),s(g,"isIntegerDataType",p),s(g,"isMostlySafeDataTypeCast",l),s(g,"isNumericDataType",o),s(g,"isRealDataType",j),s(g,"isRealFloatingPointDataType",y),s(g,"isSafeDataTypeCast",h),s(g,"isSameKindDataTypeCast",v),s(g,"isSignedIntegerDataType",b),s(g,"isUnsignedIntegerDataType",f);export{g as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..73d8f84 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplexFloatingPointDataType","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;q5IAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,iCAAAK,GAUAJ,EAAAD,EAAA,mBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,aAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,2BAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,iBAAAa,GAUAZ,EAAAD,EAAA,8BAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,4BAAAkB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index e26f071..0000000 --- a/lib/index.js +++ /dev/null @@ -1,195 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 0c6a368..47fd126 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.0", - "@stdlib/array-base-assert-has-same-values": "^0.2.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.0", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-complex128array": "^0.2.0", - "@stdlib/array-base-assert-is-complex64array": "^0.2.0", - "@stdlib/array-base-assert-is-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.0", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.0", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.0", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.0", - "@stdlib/utils-define-read-only-property": "^0.2.0" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.1.0", - "@stdlib/array-base-accessor-getter": "^0.2.0", - "@stdlib/array-base-arraylike2object": "^0.2.0", - "@stdlib/array-base-getter": "^0.2.0", - "@stdlib/array-base-ones": "^0.2.0", - "@stdlib/array-base-zeros": "^0.2.0", - "@stdlib/array-cartesian-square": "^0.1.0", - "@stdlib/array-complex128": "^0.1.0", - "@stdlib/array-complex64": "^0.1.0", - "@stdlib/array-dtype": "^0.1.0", - "@stdlib/array-dtypes": "^0.2.0", - "@stdlib/array-float32": "^0.2.0", - "@stdlib/array-float64": "^0.2.0", - "@stdlib/array-int16": "^0.2.0", - "@stdlib/array-int32": "^0.2.0", - "@stdlib/array-int8": "^0.2.0", - "@stdlib/array-mostly-safe-casts": "^0.3.0", - "@stdlib/array-safe-casts": "^0.2.0", - "@stdlib/array-same-kind-casts": "^0.2.0", - "@stdlib/array-uint16": "^0.2.0", - "@stdlib/array-uint32": "^0.2.0", - "@stdlib/array-uint8": "^0.2.0", - "@stdlib/array-uint8c": "^0.2.0", - "@stdlib/assert-has-own-property": "^0.2.0", - "@stdlib/assert-is-boolean": "^0.2.0", - "@stdlib/assert-is-collection": "^0.2.0", - "@stdlib/assert-is-same-value": "^0.2.0", - "@stdlib/buffer-alloc-unsafe": "^0.2.0", - "@stdlib/math-base-special-pow": "^0.2.0", - "@stdlib/random-array-discrete-uniform": "^0.1.0", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.0", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", - "@stdlib/error-tools-fmtprodmsg": "^0.2.0", - "@stdlib/utils-constructor-name": "^0.2.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.0", - "@stdlib/utils-keys": "^0.2.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.0" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..01572db --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 7d69ab10029797c23522618a7fc28f1c180d12f0 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 15 Feb 2024 06:53:01 +0000 Subject: [PATCH 070/208] Update README.md for ESM bundle v0.2.0 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9b6b1e1..8fb6fd7 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ limitations under the License. ## Usage ```javascript -import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@esm/index.mjs'; +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@v0.2.0-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { contains, hasSameValues, isAccessorArray, isComplex128Array, isComplex64Array, isComplexFloatingPointDataType, isDataType, isFloatingPointDataType, isIntegerDataType, isMostlySafeDataTypeCast, isNumericDataType, isRealDataType, isRealFloatingPointDataType, isSafeDataTypeCast, isSameKindDataTypeCast, isSignedIntegerDataType, isUnsignedIntegerDataType } from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@esm/index.mjs'; +import { contains, hasSameValues, isAccessorArray, isComplex128Array, isComplex64Array, isComplexFloatingPointDataType, isDataType, isFloatingPointDataType, isIntegerDataType, isMostlySafeDataTypeCast, isNumericDataType, isRealDataType, isRealFloatingPointDataType, isSafeDataTypeCast, isSameKindDataTypeCast, isSignedIntegerDataType, isUnsignedIntegerDataType } from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@v0.2.0-esm/index.mjs'; ``` #### ns @@ -95,7 +95,7 @@ The namespace exports the following: - - - - From 5547907b389b64cb98731e16835f375f71301a4f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 20 Feb 2024 04:52:34 +0000 Subject: [PATCH 074/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 ---- .github/workflows/publish.yml | 249 -- .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 132 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 228 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 53 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 204 - package.json | 104 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4874 insertions(+), 3695 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 9106b5d..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -128,7 +125,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -193,15 +190,15 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index ef144e9..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 9926236..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..d48b86e --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.0-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.0-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.0-esm/index.mjs";var g={};s(g,"contains",e),s(g,"hasSameValues",t),s(g,"isAccessorArray",a),s(g,"isComplexFloatingPointDataType",r),s(g,"isComplexTypedArray",i),s(g,"isComplex64Array",d),s(g,"isComplex128Array",n),s(g,"isDataType",m),s(g,"isFloatingPointDataType",p),s(g,"isIntegerDataType",l),s(g,"isMostlySafeDataTypeCast",o),s(g,"isNumericDataType",j),s(g,"isRealDataType",y),s(g,"isRealFloatingPointDataType",h),s(g,"isSafeDataTypeCast",v),s(g,"isSameKindDataTypeCast",b),s(g,"isSignedIntegerDataType",x),s(g,"isUnsignedIntegerDataType",f);export{g as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..39cf880 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;0oJAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,iCAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,mBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,2BAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,iBAAAc,GAUAb,EAAAD,EAAA,8BAAAe,GAUAd,EAAAD,EAAA,qBAAAgB,GAUAf,EAAAD,EAAA,yBAAAiB,GAUAhB,EAAAD,EAAA,0BAAAkB,GAUAjB,EAAAD,EAAA,4BAAAmB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2e19755..0000000 --- a/lib/index.js +++ /dev/null @@ -1,204 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 73b0b38..47fd126 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,84 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.0", - "@stdlib/array-base-assert-has-same-values": "^0.2.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.0", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-complex-typed-array": "github:stdlib-js/array-base-assert-is-complex-typed-array#main", - "@stdlib/array-base-assert-is-complex128array": "^0.2.0", - "@stdlib/array-base-assert-is-complex64array": "^0.2.0", - "@stdlib/array-base-assert-is-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.0", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.0", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.0", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.0", - "@stdlib/utils-define-read-only-property": "^0.2.0" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.0", - "@stdlib/array-base-accessor-getter": "^0.2.0", - "@stdlib/array-base-arraylike2object": "^0.2.0", - "@stdlib/array-base-getter": "^0.2.0", - "@stdlib/array-base-ones": "^0.2.0", - "@stdlib/array-base-zeros": "^0.2.0", - "@stdlib/array-cartesian-square": "^0.2.0", - "@stdlib/array-complex128": "^0.2.0", - "@stdlib/array-complex64": "^0.2.0", - "@stdlib/array-dtype": "^0.2.0", - "@stdlib/array-dtypes": "^0.2.0", - "@stdlib/array-float32": "^0.2.0", - "@stdlib/array-float64": "^0.2.0", - "@stdlib/array-int16": "^0.2.0", - "@stdlib/array-int32": "^0.2.0", - "@stdlib/array-int8": "^0.2.0", - "@stdlib/array-mostly-safe-casts": "^0.3.0", - "@stdlib/array-safe-casts": "^0.2.0", - "@stdlib/array-same-kind-casts": "^0.2.0", - "@stdlib/array-uint16": "^0.2.0", - "@stdlib/array-uint32": "^0.2.0", - "@stdlib/array-uint8": "^0.2.0", - "@stdlib/array-uint8c": "^0.2.0", - "@stdlib/assert-has-own-property": "^0.2.0", - "@stdlib/assert-is-boolean": "^0.2.0", - "@stdlib/assert-is-collection": "^0.2.0", - "@stdlib/assert-is-same-value": "^0.2.0", - "@stdlib/buffer-alloc-unsafe": "^0.2.0", - "@stdlib/math-base-special-pow": "^0.2.0", - "@stdlib/random-array-discrete-uniform": "^0.2.0", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.0", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", - "@stdlib/error-tools-fmtprodmsg": "^0.2.0", - "@stdlib/utils-constructor-name": "^0.2.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.0", - "@stdlib/utils-keys": "^0.2.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.0" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..9a0a2e3 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 9f38d8817dedc934b562122d16c8242f1b61cbcf Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 21 Feb 2024 23:41:01 +0000 Subject: [PATCH 075/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5c942b8..3448087 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "@stdlib/random-array-discrete-uniform": "^0.2.0", "@stdlib/strided-base-reinterpret-complex128": "^0.2.0", "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/utils-constructor-name": "^0.2.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", "@stdlib/utils-keys": "^0.2.0", From 18e1de0b6c04afac03da9ab9798f0994edaa1013 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 21 Feb 2024 23:41:27 +0000 Subject: [PATCH 076/208] Remove files --- index.d.ts | 143 -- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 4990 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index c9a109e..0000000 --- a/index.d.ts +++ /dev/null @@ -1,143 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index d48b86e..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.0-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.0-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.0-esm/index.mjs";var g={};s(g,"contains",e),s(g,"hasSameValues",t),s(g,"isAccessorArray",a),s(g,"isComplexFloatingPointDataType",r),s(g,"isComplexTypedArray",i),s(g,"isComplex64Array",d),s(g,"isComplex128Array",n),s(g,"isDataType",m),s(g,"isFloatingPointDataType",p),s(g,"isIntegerDataType",l),s(g,"isMostlySafeDataTypeCast",o),s(g,"isNumericDataType",j),s(g,"isRealDataType",y),s(g,"isRealFloatingPointDataType",h),s(g,"isSafeDataTypeCast",v),s(g,"isSameKindDataTypeCast",b),s(g,"isSignedIntegerDataType",x),s(g,"isUnsignedIntegerDataType",f);export{g as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 39cf880..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;0oJAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,iCAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,mBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,2BAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,iBAAAc,GAUAb,EAAAD,EAAA,8BAAAe,GAUAd,EAAAD,EAAA,qBAAAgB,GAUAf,EAAAD,EAAA,yBAAAiB,GAUAhB,EAAAD,EAAA,0BAAAkB,GAUAjB,EAAAD,EAAA,4BAAAmB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 9a0a2e3..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 4d59e179569054ddce1596aad49fb300ea4a37c6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 21 Feb 2024 23:43:32 +0000 Subject: [PATCH 077/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 ---- .github/workflows/publish.yml | 249 -- .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 132 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 228 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 53 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 204 - package.json | 104 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4874 insertions(+), 3695 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 9106b5d..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -128,7 +125,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -193,15 +190,15 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index ef144e9..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 9926236..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..a0819c4 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.0-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.0-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.0-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.0-esm/index.mjs";var g={};s(g,"contains",e),s(g,"hasSameValues",t),s(g,"isAccessorArray",a),s(g,"isComplexFloatingPointDataType",r),s(g,"isComplexTypedArray",i),s(g,"isComplex64Array",d),s(g,"isComplex128Array",n),s(g,"isDataType",m),s(g,"isFloatingPointDataType",p),s(g,"isIntegerDataType",l),s(g,"isMostlySafeDataTypeCast",o),s(g,"isNumericDataType",j),s(g,"isRealDataType",y),s(g,"isRealFloatingPointDataType",h),s(g,"isSafeDataTypeCast",v),s(g,"isSameKindDataTypeCast",b),s(g,"isSignedIntegerDataType",x),s(g,"isUnsignedIntegerDataType",f);export{g as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..1c9d8a7 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;wpJAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,iCAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,mBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,2BAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,iBAAAc,GAUAb,EAAAD,EAAA,8BAAAe,GAUAd,EAAAD,EAAA,qBAAAgB,GAUAf,EAAAD,EAAA,yBAAAiB,GAUAhB,EAAAD,EAAA,0BAAAkB,GAUAjB,EAAAD,EAAA,4BAAAmB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2e19755..0000000 --- a/lib/index.js +++ /dev/null @@ -1,204 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 3448087..47fd126 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,84 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.0", - "@stdlib/array-base-assert-has-same-values": "^0.2.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.0", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.0", - "@stdlib/array-base-assert-is-complex128array": "^0.2.0", - "@stdlib/array-base-assert-is-complex64array": "^0.2.0", - "@stdlib/array-base-assert-is-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.0", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.0", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.0", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.0", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.0", - "@stdlib/array-base-accessor-getter": "^0.2.0", - "@stdlib/array-base-arraylike2object": "^0.2.0", - "@stdlib/array-base-getter": "^0.2.0", - "@stdlib/array-base-ones": "^0.2.0", - "@stdlib/array-base-zeros": "^0.2.0", - "@stdlib/array-cartesian-square": "^0.2.0", - "@stdlib/array-complex128": "^0.2.0", - "@stdlib/array-complex64": "^0.2.0", - "@stdlib/array-dtype": "^0.2.0", - "@stdlib/array-dtypes": "^0.2.0", - "@stdlib/array-float32": "^0.2.0", - "@stdlib/array-float64": "^0.2.0", - "@stdlib/array-int16": "^0.2.0", - "@stdlib/array-int32": "^0.2.0", - "@stdlib/array-int8": "^0.2.0", - "@stdlib/array-mostly-safe-casts": "^0.3.0", - "@stdlib/array-safe-casts": "^0.2.0", - "@stdlib/array-same-kind-casts": "^0.2.0", - "@stdlib/array-uint16": "^0.2.0", - "@stdlib/array-uint32": "^0.2.0", - "@stdlib/array-uint8": "^0.2.0", - "@stdlib/array-uint8c": "^0.2.0", - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.0", - "@stdlib/assert-is-same-value": "^0.2.0", - "@stdlib/buffer-alloc-unsafe": "^0.2.0", - "@stdlib/math-base-special-pow": "^0.2.0", - "@stdlib/random-array-discrete-uniform": "^0.2.0", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.0", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/utils-constructor-name": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-keys": "^0.2.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.0" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..b2be158 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From dfd31167eea81a6034351a09b1bcf6ef083b534a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 21 Feb 2024 23:47:14 +0000 Subject: [PATCH 078/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5c942b8..3448087 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "@stdlib/random-array-discrete-uniform": "^0.2.0", "@stdlib/strided-base-reinterpret-complex128": "^0.2.0", "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/utils-constructor-name": "^0.2.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", "@stdlib/utils-keys": "^0.2.0", From b5616994c83f7375326455191d2e0344e88a00d2 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 21 Feb 2024 23:49:25 +0000 Subject: [PATCH 079/208] Remove files --- index.d.ts | 610 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5457 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 10745d2..0000000 --- a/index.d.ts +++ /dev/null @@ -1,610 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index a0819c4..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.0-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.0-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.0-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.0-esm/index.mjs";var g={};s(g,"contains",e),s(g,"hasSameValues",t),s(g,"isAccessorArray",a),s(g,"isComplexFloatingPointDataType",r),s(g,"isComplexTypedArray",i),s(g,"isComplex64Array",d),s(g,"isComplex128Array",n),s(g,"isDataType",m),s(g,"isFloatingPointDataType",p),s(g,"isIntegerDataType",l),s(g,"isMostlySafeDataTypeCast",o),s(g,"isNumericDataType",j),s(g,"isRealDataType",y),s(g,"isRealFloatingPointDataType",h),s(g,"isSafeDataTypeCast",v),s(g,"isSameKindDataTypeCast",b),s(g,"isSignedIntegerDataType",x),s(g,"isUnsignedIntegerDataType",f);export{g as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 1c9d8a7..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;wpJAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,iCAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,mBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,2BAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,iBAAAc,GAUAb,EAAAD,EAAA,8BAAAe,GAUAd,EAAAD,EAAA,qBAAAgB,GAUAf,EAAAD,EAAA,yBAAAiB,GAUAhB,EAAAD,EAAA,0BAAAkB,GAUAjB,EAAAD,EAAA,4BAAAmB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index b2be158..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 04bb0e005960a44298827be35d84fe8c971e05f6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 21 Feb 2024 23:51:21 +0000 Subject: [PATCH 080/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 ---- .github/workflows/publish.yml | 249 -- .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 132 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 228 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 79 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 204 - package.json | 104 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4887 insertions(+), 3708 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 9106b5d..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -141,7 +138,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -206,41 +203,41 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index ef144e9..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 9926236..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..a0819c4 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.0-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.0-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.0-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.0-esm/index.mjs";var g={};s(g,"contains",e),s(g,"hasSameValues",t),s(g,"isAccessorArray",a),s(g,"isComplexFloatingPointDataType",r),s(g,"isComplexTypedArray",i),s(g,"isComplex64Array",d),s(g,"isComplex128Array",n),s(g,"isDataType",m),s(g,"isFloatingPointDataType",p),s(g,"isIntegerDataType",l),s(g,"isMostlySafeDataTypeCast",o),s(g,"isNumericDataType",j),s(g,"isRealDataType",y),s(g,"isRealFloatingPointDataType",h),s(g,"isSafeDataTypeCast",v),s(g,"isSameKindDataTypeCast",b),s(g,"isSignedIntegerDataType",x),s(g,"isUnsignedIntegerDataType",f);export{g as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..1c9d8a7 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;wpJAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,iCAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,mBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,2BAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,iBAAAc,GAUAb,EAAAD,EAAA,8BAAAe,GAUAd,EAAAD,EAAA,qBAAAgB,GAUAf,EAAAD,EAAA,yBAAAiB,GAUAhB,EAAAD,EAAA,0BAAAkB,GAUAjB,EAAAD,EAAA,4BAAAmB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2e19755..0000000 --- a/lib/index.js +++ /dev/null @@ -1,204 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 3448087..47fd126 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,84 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.0", - "@stdlib/array-base-assert-has-same-values": "^0.2.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.0", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.0", - "@stdlib/array-base-assert-is-complex128array": "^0.2.0", - "@stdlib/array-base-assert-is-complex64array": "^0.2.0", - "@stdlib/array-base-assert-is-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.0", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.0", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.0", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.0", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.0", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.0", - "@stdlib/array-base-accessor-getter": "^0.2.0", - "@stdlib/array-base-arraylike2object": "^0.2.0", - "@stdlib/array-base-getter": "^0.2.0", - "@stdlib/array-base-ones": "^0.2.0", - "@stdlib/array-base-zeros": "^0.2.0", - "@stdlib/array-cartesian-square": "^0.2.0", - "@stdlib/array-complex128": "^0.2.0", - "@stdlib/array-complex64": "^0.2.0", - "@stdlib/array-dtype": "^0.2.0", - "@stdlib/array-dtypes": "^0.2.0", - "@stdlib/array-float32": "^0.2.0", - "@stdlib/array-float64": "^0.2.0", - "@stdlib/array-int16": "^0.2.0", - "@stdlib/array-int32": "^0.2.0", - "@stdlib/array-int8": "^0.2.0", - "@stdlib/array-mostly-safe-casts": "^0.3.0", - "@stdlib/array-safe-casts": "^0.2.0", - "@stdlib/array-same-kind-casts": "^0.2.0", - "@stdlib/array-uint16": "^0.2.0", - "@stdlib/array-uint32": "^0.2.0", - "@stdlib/array-uint8": "^0.2.0", - "@stdlib/array-uint8c": "^0.2.0", - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.0", - "@stdlib/assert-is-same-value": "^0.2.0", - "@stdlib/buffer-alloc-unsafe": "^0.2.0", - "@stdlib/math-base-special-pow": "^0.2.0", - "@stdlib/random-array-discrete-uniform": "^0.2.0", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.0", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/utils-constructor-name": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-keys": "^0.2.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.0" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..b2be158 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 3a24291a3094a7d22603e183389c35cc6b35f013 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 25 Feb 2024 21:03:03 +0000 Subject: [PATCH 081/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d5ce905..b732da9 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "@stdlib/random-array-discrete-uniform": "^0.2.0", "@stdlib/strided-base-reinterpret-complex128": "^0.2.1", "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/utils-constructor-name": "^0.2.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", "@stdlib/utils-keys": "^0.2.1", From 24571622d6ad3137c3d30a3561127168cb72f873 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 25 Feb 2024 22:21:20 +0000 Subject: [PATCH 082/208] Remove files --- index.d.ts | 610 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5457 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 10745d2..0000000 --- a/index.d.ts +++ /dev/null @@ -1,610 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index a0819c4..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.0-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.0-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.0-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.0-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.0-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.0-esm/index.mjs";var g={};s(g,"contains",e),s(g,"hasSameValues",t),s(g,"isAccessorArray",a),s(g,"isComplexFloatingPointDataType",r),s(g,"isComplexTypedArray",i),s(g,"isComplex64Array",d),s(g,"isComplex128Array",n),s(g,"isDataType",m),s(g,"isFloatingPointDataType",p),s(g,"isIntegerDataType",l),s(g,"isMostlySafeDataTypeCast",o),s(g,"isNumericDataType",j),s(g,"isRealDataType",y),s(g,"isRealFloatingPointDataType",h),s(g,"isSafeDataTypeCast",v),s(g,"isSameKindDataTypeCast",b),s(g,"isSignedIntegerDataType",x),s(g,"isUnsignedIntegerDataType",f);export{g as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 1c9d8a7..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;wpJAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,iCAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,mBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,2BAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,iBAAAc,GAUAb,EAAAD,EAAA,8BAAAe,GAUAd,EAAAD,EAAA,qBAAAgB,GAUAf,EAAAD,EAAA,yBAAAiB,GAUAhB,EAAAD,EAAA,0BAAAkB,GAUAjB,EAAAD,EAAA,4BAAAmB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index b2be158..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From b24dec752cd1e3e249024cb3fe22221ba467d306 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 25 Feb 2024 22:22:02 +0000 Subject: [PATCH 083/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 ---- .github/workflows/publish.yml | 249 -- .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 132 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 228 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 79 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 204 - package.json | 104 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4887 insertions(+), 3708 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 9106b5d..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -141,7 +138,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -206,41 +203,41 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index ef144e9..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 9926236..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..f355d19 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var g={};s(g,"contains",e),s(g,"hasSameValues",t),s(g,"isAccessorArray",a),s(g,"isComplexFloatingPointDataType",r),s(g,"isComplexTypedArray",i),s(g,"isComplex64Array",d),s(g,"isComplex128Array",n),s(g,"isDataType",m),s(g,"isFloatingPointDataType",p),s(g,"isIntegerDataType",l),s(g,"isMostlySafeDataTypeCast",o),s(g,"isNumericDataType",j),s(g,"isRealDataType",y),s(g,"isRealFloatingPointDataType",h),s(g,"isSafeDataTypeCast",v),s(g,"isSameKindDataTypeCast",b),s(g,"isSignedIntegerDataType",x),s(g,"isUnsignedIntegerDataType",f);export{g as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..1c9d8a7 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;wpJAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,iCAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,mBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,2BAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,iBAAAc,GAUAb,EAAAD,EAAA,8BAAAe,GAUAd,EAAAD,EAAA,qBAAAgB,GAUAf,EAAAD,EAAA,yBAAAiB,GAUAhB,EAAAD,EAAA,0BAAAkB,GAUAjB,EAAAD,EAAA,4BAAAmB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2e19755..0000000 --- a/lib/index.js +++ /dev/null @@ -1,204 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index b732da9..ee2a097 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,84 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.1", - "@stdlib/array-base-assert-has-same-values": "^0.2.1", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.1", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.1", - "@stdlib/array-base-assert-is-complex128array": "^0.2.1", - "@stdlib/array-base-assert-is-complex64array": "^0.2.1", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.1", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.1", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.1", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.0", - "@stdlib/array-base-accessor-getter": "^0.2.1", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.1", - "@stdlib/array-base-ones": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.1", - "@stdlib/array-cartesian-square": "^0.2.0", - "@stdlib/array-complex128": "^0.2.0", - "@stdlib/array-complex64": "^0.2.0", - "@stdlib/array-dtype": "^0.2.0", - "@stdlib/array-dtypes": "^0.2.1", - "@stdlib/array-float32": "^0.2.1", - "@stdlib/array-float64": "^0.2.1", - "@stdlib/array-int16": "^0.2.1", - "@stdlib/array-int32": "^0.2.1", - "@stdlib/array-int8": "^0.2.1", - "@stdlib/array-mostly-safe-casts": "^0.3.1", - "@stdlib/array-safe-casts": "^0.2.1", - "@stdlib/array-same-kind-casts": "^0.2.1", - "@stdlib/array-uint16": "^0.2.1", - "@stdlib/array-uint32": "^0.2.1", - "@stdlib/array-uint8": "^0.2.1", - "@stdlib/array-uint8c": "^0.2.1", - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.1", - "@stdlib/assert-is-same-value": "^0.2.1", - "@stdlib/buffer-alloc-unsafe": "^0.2.1", - "@stdlib/math-base-special-pow": "^0.2.1", - "@stdlib/random-array-discrete-uniform": "^0.2.0", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.1", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/utils-constructor-name": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..1e527ca --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 1a4fd732cb9fc07d612e4fb726d1bce578691e97 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 25 Feb 2024 22:36:23 +0000 Subject: [PATCH 084/208] Update README.md for ESM bundle v0.2.1 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f60b2eb..4031083 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ limitations under the License. ## Usage ```javascript -import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@esm/index.mjs'; +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@v0.2.1-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { contains, hasSameValues, isAccessorArray, isComplex128Array, isComplex64Array, isComplexFloatingPointDataType, isComplexTypedArray, isDataType, isFloatingPointDataType, isIntegerDataType, isMostlySafeDataTypeCast, isNumericDataType, isRealDataType, isRealFloatingPointDataType, isSafeDataTypeCast, isSameKindDataTypeCast, isSignedIntegerDataType, isUnsignedIntegerDataType } from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@esm/index.mjs'; +import { contains, hasSameValues, isAccessorArray, isComplex128Array, isComplex64Array, isComplexFloatingPointDataType, isComplexTypedArray, isDataType, isFloatingPointDataType, isIntegerDataType, isMostlySafeDataTypeCast, isNumericDataType, isRealDataType, isRealFloatingPointDataType, isSafeDataTypeCast, isSameKindDataTypeCast, isSignedIntegerDataType, isUnsignedIntegerDataType } from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@v0.2.1-esm/index.mjs'; ``` #### ns @@ -108,7 +108,7 @@ The namespace exports the following: - - - - From 73536c01df4d04b682946df5256f1dc346cb6661 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Apr 2024 14:11:12 +0000 Subject: [PATCH 088/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 ---- .github/workflows/publish.yml | 249 -- .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 132 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 79 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 204 - package.json | 104 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4887 insertions(+), 3713 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 3f8be7f..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-04-01T05:56:10.304Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index ec90164..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -141,7 +138,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -206,41 +203,41 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index ef144e9..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 9926236..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..a03d63d --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var g={};s(g,"contains",e),s(g,"hasSameValues",t),s(g,"isAccessorArray",a),s(g,"isComplexFloatingPointDataType",r),s(g,"isComplexTypedArray",i),s(g,"isComplex64Array",d),s(g,"isComplex128Array",n),s(g,"isDataType",m),s(g,"isFloatingPointDataType",p),s(g,"isIntegerDataType",l),s(g,"isMostlySafeDataTypeCast",o),s(g,"isNumericDataType",j),s(g,"isRealDataType",y),s(g,"isRealFloatingPointDataType",h),s(g,"isSafeDataTypeCast",v),s(g,"isSameKindDataTypeCast",b),s(g,"isSignedIntegerDataType",x),s(g,"isUnsignedIntegerDataType",f);export{g as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..1c9d8a7 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;wpJAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,iCAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,mBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,2BAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,iBAAAc,GAUAb,EAAAD,EAAA,8BAAAe,GAUAd,EAAAD,EAAA,qBAAAgB,GAUAf,EAAAD,EAAA,yBAAAiB,GAUAhB,EAAAD,EAAA,0BAAAkB,GAUAjB,EAAAD,EAAA,4BAAAmB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2e19755..0000000 --- a/lib/index.js +++ /dev/null @@ -1,204 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 0bdc9e2..ee2a097 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,84 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.1", - "@stdlib/array-base-assert-has-same-values": "^0.2.1", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.1", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.1", - "@stdlib/array-base-assert-is-complex128array": "^0.2.1", - "@stdlib/array-base-assert-is-complex64array": "^0.2.1", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.1", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.1", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.1", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.1", - "@stdlib/array-base-accessor-getter": "^0.2.1", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.1", - "@stdlib/array-base-ones": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.1", - "@stdlib/array-cartesian-square": "^0.2.1", - "@stdlib/array-complex128": "^0.2.1", - "@stdlib/array-complex64": "^0.2.1", - "@stdlib/array-dtype": "^0.2.1", - "@stdlib/array-dtypes": "^0.2.1", - "@stdlib/array-float32": "^0.2.1", - "@stdlib/array-float64": "^0.2.1", - "@stdlib/array-int16": "^0.2.1", - "@stdlib/array-int32": "^0.2.1", - "@stdlib/array-int8": "^0.2.1", - "@stdlib/array-mostly-safe-casts": "^0.3.1", - "@stdlib/array-safe-casts": "^0.2.1", - "@stdlib/array-same-kind-casts": "^0.2.1", - "@stdlib/array-uint16": "^0.2.1", - "@stdlib/array-uint32": "^0.2.1", - "@stdlib/array-uint8": "^0.2.1", - "@stdlib/array-uint8c": "^0.2.1", - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.1", - "@stdlib/assert-is-same-value": "^0.2.1", - "@stdlib/buffer-alloc-unsafe": "^0.2.1", - "@stdlib/math-base-special-pow": "^0.2.1", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.1", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/utils-constructor-name": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..bf287d1 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 5f0d38a75f834daf27c79dd8d48631ab32e97ac6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 12 Apr 2024 04:40:59 +0000 Subject: [PATCH 089/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index de26bd3..0bdc9e2 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "@stdlib/random-array-discrete-uniform": "^0.2.1", "@stdlib/strided-base-reinterpret-complex128": "^0.2.1", "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/utils-constructor-name": "^0.2.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", "@stdlib/utils-keys": "^0.2.1", From f01f9934034b98dee76351b5563a7e43d0138ad3 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 12 Apr 2024 10:27:36 +0000 Subject: [PATCH 090/208] Remove files --- index.d.ts | 610 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5457 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 10745d2..0000000 --- a/index.d.ts +++ /dev/null @@ -1,610 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index a03d63d..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var g={};s(g,"contains",e),s(g,"hasSameValues",t),s(g,"isAccessorArray",a),s(g,"isComplexFloatingPointDataType",r),s(g,"isComplexTypedArray",i),s(g,"isComplex64Array",d),s(g,"isComplex128Array",n),s(g,"isDataType",m),s(g,"isFloatingPointDataType",p),s(g,"isIntegerDataType",l),s(g,"isMostlySafeDataTypeCast",o),s(g,"isNumericDataType",j),s(g,"isRealDataType",y),s(g,"isRealFloatingPointDataType",h),s(g,"isSafeDataTypeCast",v),s(g,"isSameKindDataTypeCast",b),s(g,"isSignedIntegerDataType",x),s(g,"isUnsignedIntegerDataType",f);export{g as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 1c9d8a7..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;wpJAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,iCAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,mBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,2BAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,iBAAAc,GAUAb,EAAAD,EAAA,8BAAAe,GAUAd,EAAAD,EAAA,qBAAAgB,GAUAf,EAAAD,EAAA,yBAAAiB,GAUAhB,EAAAD,EAAA,0BAAAkB,GAUAjB,EAAAD,EAAA,4BAAAmB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index bf287d1..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 41bf5c3e5c8c0199183240dd4e11897818b2909f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 12 Apr 2024 10:28:08 +0000 Subject: [PATCH 091/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 ---- .github/workflows/publish.yml | 249 -- .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 134 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 79 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 204 - package.json | 104 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4887 insertions(+), 3714 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index ec90164..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -141,7 +138,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -206,41 +203,41 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index ef144e9..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 9926236..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..a03d63d --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var g={};s(g,"contains",e),s(g,"hasSameValues",t),s(g,"isAccessorArray",a),s(g,"isComplexFloatingPointDataType",r),s(g,"isComplexTypedArray",i),s(g,"isComplex64Array",d),s(g,"isComplex128Array",n),s(g,"isDataType",m),s(g,"isFloatingPointDataType",p),s(g,"isIntegerDataType",l),s(g,"isMostlySafeDataTypeCast",o),s(g,"isNumericDataType",j),s(g,"isRealDataType",y),s(g,"isRealFloatingPointDataType",h),s(g,"isSafeDataTypeCast",v),s(g,"isSameKindDataTypeCast",b),s(g,"isSignedIntegerDataType",x),s(g,"isUnsignedIntegerDataType",f);export{g as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..1c9d8a7 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;wpJAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,iCAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,mBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,2BAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,iBAAAc,GAUAb,EAAAD,EAAA,8BAAAe,GAUAd,EAAAD,EAAA,qBAAAgB,GAUAf,EAAAD,EAAA,yBAAAiB,GAUAhB,EAAAD,EAAA,0BAAAkB,GAUAjB,EAAAD,EAAA,4BAAAmB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2e19755..0000000 --- a/lib/index.js +++ /dev/null @@ -1,204 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 0bdc9e2..ee2a097 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,84 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.1", - "@stdlib/array-base-assert-has-same-values": "^0.2.1", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.1", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.1", - "@stdlib/array-base-assert-is-complex128array": "^0.2.1", - "@stdlib/array-base-assert-is-complex64array": "^0.2.1", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.1", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.1", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.1", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.1", - "@stdlib/array-base-accessor-getter": "^0.2.1", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.1", - "@stdlib/array-base-ones": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.1", - "@stdlib/array-cartesian-square": "^0.2.1", - "@stdlib/array-complex128": "^0.2.1", - "@stdlib/array-complex64": "^0.2.1", - "@stdlib/array-dtype": "^0.2.1", - "@stdlib/array-dtypes": "^0.2.1", - "@stdlib/array-float32": "^0.2.1", - "@stdlib/array-float64": "^0.2.1", - "@stdlib/array-int16": "^0.2.1", - "@stdlib/array-int32": "^0.2.1", - "@stdlib/array-int8": "^0.2.1", - "@stdlib/array-mostly-safe-casts": "^0.3.1", - "@stdlib/array-safe-casts": "^0.2.1", - "@stdlib/array-same-kind-casts": "^0.2.1", - "@stdlib/array-uint16": "^0.2.1", - "@stdlib/array-uint32": "^0.2.1", - "@stdlib/array-uint8": "^0.2.1", - "@stdlib/array-uint8c": "^0.2.1", - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.1", - "@stdlib/assert-is-same-value": "^0.2.1", - "@stdlib/buffer-alloc-unsafe": "^0.2.1", - "@stdlib/math-base-special-pow": "^0.2.1", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.1", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/utils-constructor-name": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..bf287d1 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 3215c15e8de3afd620a7ff949771a67afa8680b4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 17 Jun 2024 04:22:33 +0000 Subject: [PATCH 092/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c84420e..016967c 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "@stdlib/random-array-discrete-uniform": "^0.2.1", "@stdlib/strided-base-reinterpret-complex128": "^0.2.1", "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/utils-constructor-name": "^0.2.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", "@stdlib/utils-keys": "^0.2.1", From f152dbe4060e14c3217dbda9bbe8969442b8e6d7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 17 Jun 2024 04:22:56 +0000 Subject: [PATCH 093/208] Remove files --- index.d.ts | 610 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5457 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 10745d2..0000000 --- a/index.d.ts +++ /dev/null @@ -1,610 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index a03d63d..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var g={};s(g,"contains",e),s(g,"hasSameValues",t),s(g,"isAccessorArray",a),s(g,"isComplexFloatingPointDataType",r),s(g,"isComplexTypedArray",i),s(g,"isComplex64Array",d),s(g,"isComplex128Array",n),s(g,"isDataType",m),s(g,"isFloatingPointDataType",p),s(g,"isIntegerDataType",l),s(g,"isMostlySafeDataTypeCast",o),s(g,"isNumericDataType",j),s(g,"isRealDataType",y),s(g,"isRealFloatingPointDataType",h),s(g,"isSafeDataTypeCast",v),s(g,"isSameKindDataTypeCast",b),s(g,"isSignedIntegerDataType",x),s(g,"isUnsignedIntegerDataType",f);export{g as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 1c9d8a7..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;wpJAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,iCAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,mBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,2BAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,iBAAAc,GAUAb,EAAAD,EAAA,8BAAAe,GAUAd,EAAAD,EAAA,qBAAAgB,GAUAf,EAAAD,EAAA,yBAAAiB,GAUAhB,EAAAD,EAAA,0BAAAkB,GAUAjB,EAAAD,EAAA,4BAAAmB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index bf287d1..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 35adf599758d3f6a1c182288e37c656107aaa007 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 17 Jun 2024 04:23:19 +0000 Subject: [PATCH 094/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 ---- .github/workflows/publish.yml | 252 -- .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .gitignore | 188 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 726 --- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 79 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 222 - package.json | 107 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4887 insertions(+), 4467 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f92a6c5..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -141,7 +138,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -206,41 +203,41 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 4fa5655..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index c93484f..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..f12b31a --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var u={};s(u,"contains",e),s(u,"hasSameValues",a),s(u,"isAccessorArray",t),s(u,"isBooleanDataType",r),s(u,"isBooleanArray",i),s(u,"isComplexFloatingPointDataType",d),s(u,"isComplexTypedArray",n),s(u,"isComplex64Array",m),s(u,"isComplex128Array",p),s(u,"isDataType",l),s(u,"isFloatingPointDataType",o),s(u,"isIntegerDataType",j),s(u,"isMostlySafeDataTypeCast",y),s(u,"isNumericDataType",h),s(u,"isRealDataType",b),s(u,"isRealFloatingPointDataType",v),s(u,"isSafeDataTypeCast",x),s(u,"isSameKindDataTypeCast",f),s(u,"isSignedIntegerDataType",g),s(u,"isUnsignedIntegerDataType",c);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..4dd4bbb --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;ymKAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,oBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,iCAAAO,GAUAN,EAAAD,EAAA,sBAAAQ,GAUAP,EAAAD,EAAA,mBAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,aAAAW,GAUAV,EAAAD,EAAA,0BAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,iBAAAgB,GAUAf,EAAAD,EAAA,8BAAAiB,GAUAhB,EAAAD,EAAA,qBAAAkB,GAUAjB,EAAAD,EAAA,yBAAAmB,GAUAlB,EAAAD,EAAA,0BAAAoB,GAUAnB,EAAAD,EAAA,4BAAAqB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index b2057c7..0000000 --- a/lib/index.js +++ /dev/null @@ -1,222 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 016967c..ee2a097 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,87 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.1", - "@stdlib/array-base-assert-has-same-values": "^0.2.1", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.1", - "@stdlib/array-base-assert-is-boolean-data-type": "github:stdlib-js/array-base-assert-is-boolean-data-type#main", - "@stdlib/array-base-assert-is-booleanarray": "github:stdlib-js/array-base-assert-is-booleanarray#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.1", - "@stdlib/array-base-assert-is-complex128array": "^0.2.1", - "@stdlib/array-base-assert-is-complex64array": "^0.2.1", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.1", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.1", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.1", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.1", - "@stdlib/array-base-accessor-getter": "^0.2.1", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.1", - "@stdlib/array-base-ones": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.1", - "@stdlib/array-bool": "github:stdlib-js/array-bool#main", - "@stdlib/array-cartesian-square": "^0.2.1", - "@stdlib/array-complex128": "^0.2.1", - "@stdlib/array-complex64": "^0.2.1", - "@stdlib/array-dtype": "^0.2.1", - "@stdlib/array-dtypes": "^0.2.1", - "@stdlib/array-float32": "^0.2.1", - "@stdlib/array-float64": "^0.2.1", - "@stdlib/array-int16": "^0.2.1", - "@stdlib/array-int32": "^0.2.1", - "@stdlib/array-int8": "^0.2.1", - "@stdlib/array-mostly-safe-casts": "^0.3.1", - "@stdlib/array-safe-casts": "^0.2.1", - "@stdlib/array-same-kind-casts": "^0.2.1", - "@stdlib/array-uint16": "^0.2.1", - "@stdlib/array-uint32": "^0.2.1", - "@stdlib/array-uint8": "^0.2.1", - "@stdlib/array-uint8c": "^0.2.1", - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.1", - "@stdlib/assert-is-same-value": "^0.2.1", - "@stdlib/buffer-alloc-unsafe": "^0.2.1", - "@stdlib/math-base-special-pow": "^0.2.1", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.1", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/utils-constructor-name": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..51552a4 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From c6a1ea9c79ddf0a6d8435ae0ac07f41d885ce1c4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 17 Jun 2024 13:20:30 +0000 Subject: [PATCH 095/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c84420e..016967c 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "@stdlib/random-array-discrete-uniform": "^0.2.1", "@stdlib/strided-base-reinterpret-complex128": "^0.2.1", "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/utils-constructor-name": "^0.2.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", "@stdlib/utils-keys": "^0.2.1", From 10fb1734bda68be3e747d1a7245ecdfc0285bd17 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 17 Jun 2024 13:20:57 +0000 Subject: [PATCH 096/208] Remove files --- index.d.ts | 610 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5457 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 10745d2..0000000 --- a/index.d.ts +++ /dev/null @@ -1,610 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index f12b31a..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var u={};s(u,"contains",e),s(u,"hasSameValues",a),s(u,"isAccessorArray",t),s(u,"isBooleanDataType",r),s(u,"isBooleanArray",i),s(u,"isComplexFloatingPointDataType",d),s(u,"isComplexTypedArray",n),s(u,"isComplex64Array",m),s(u,"isComplex128Array",p),s(u,"isDataType",l),s(u,"isFloatingPointDataType",o),s(u,"isIntegerDataType",j),s(u,"isMostlySafeDataTypeCast",y),s(u,"isNumericDataType",h),s(u,"isRealDataType",b),s(u,"isRealFloatingPointDataType",v),s(u,"isSafeDataTypeCast",x),s(u,"isSameKindDataTypeCast",f),s(u,"isSignedIntegerDataType",g),s(u,"isUnsignedIntegerDataType",c);export{u as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 4dd4bbb..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;ymKAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,oBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,iCAAAO,GAUAN,EAAAD,EAAA,sBAAAQ,GAUAP,EAAAD,EAAA,mBAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,aAAAW,GAUAV,EAAAD,EAAA,0BAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,iBAAAgB,GAUAf,EAAAD,EAAA,8BAAAiB,GAUAhB,EAAAD,EAAA,qBAAAkB,GAUAjB,EAAAD,EAAA,yBAAAmB,GAUAlB,EAAAD,EAAA,0BAAAoB,GAUAnB,EAAAD,EAAA,4BAAAqB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 51552a4..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From add94671f2c71b4081c3e71e95730dc073e3deb4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 17 Jun 2024 13:22:14 +0000 Subject: [PATCH 097/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 ---- .github/workflows/publish.yml | 252 -- .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .gitignore | 188 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 728 ---- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 83 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 222 - package.json | 107 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4889 insertions(+), 4471 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f92a6c5..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -143,7 +140,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -208,45 +205,45 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 4fa5655..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index c93484f..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..f12b31a --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var u={};s(u,"contains",e),s(u,"hasSameValues",a),s(u,"isAccessorArray",t),s(u,"isBooleanDataType",r),s(u,"isBooleanArray",i),s(u,"isComplexFloatingPointDataType",d),s(u,"isComplexTypedArray",n),s(u,"isComplex64Array",m),s(u,"isComplex128Array",p),s(u,"isDataType",l),s(u,"isFloatingPointDataType",o),s(u,"isIntegerDataType",j),s(u,"isMostlySafeDataTypeCast",y),s(u,"isNumericDataType",h),s(u,"isRealDataType",b),s(u,"isRealFloatingPointDataType",v),s(u,"isSafeDataTypeCast",x),s(u,"isSameKindDataTypeCast",f),s(u,"isSignedIntegerDataType",g),s(u,"isUnsignedIntegerDataType",c);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..4dd4bbb --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;ymKAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,oBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,iCAAAO,GAUAN,EAAAD,EAAA,sBAAAQ,GAUAP,EAAAD,EAAA,mBAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,aAAAW,GAUAV,EAAAD,EAAA,0BAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,iBAAAgB,GAUAf,EAAAD,EAAA,8BAAAiB,GAUAhB,EAAAD,EAAA,qBAAAkB,GAUAjB,EAAAD,EAAA,yBAAAmB,GAUAlB,EAAAD,EAAA,0BAAAoB,GAUAnB,EAAAD,EAAA,4BAAAqB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index b2057c7..0000000 --- a/lib/index.js +++ /dev/null @@ -1,222 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 016967c..ee2a097 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,87 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.1", - "@stdlib/array-base-assert-has-same-values": "^0.2.1", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.1", - "@stdlib/array-base-assert-is-boolean-data-type": "github:stdlib-js/array-base-assert-is-boolean-data-type#main", - "@stdlib/array-base-assert-is-booleanarray": "github:stdlib-js/array-base-assert-is-booleanarray#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.1", - "@stdlib/array-base-assert-is-complex128array": "^0.2.1", - "@stdlib/array-base-assert-is-complex64array": "^0.2.1", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.1", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.1", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.1", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.1", - "@stdlib/array-base-accessor-getter": "^0.2.1", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.1", - "@stdlib/array-base-ones": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.1", - "@stdlib/array-bool": "github:stdlib-js/array-bool#main", - "@stdlib/array-cartesian-square": "^0.2.1", - "@stdlib/array-complex128": "^0.2.1", - "@stdlib/array-complex64": "^0.2.1", - "@stdlib/array-dtype": "^0.2.1", - "@stdlib/array-dtypes": "^0.2.1", - "@stdlib/array-float32": "^0.2.1", - "@stdlib/array-float64": "^0.2.1", - "@stdlib/array-int16": "^0.2.1", - "@stdlib/array-int32": "^0.2.1", - "@stdlib/array-int8": "^0.2.1", - "@stdlib/array-mostly-safe-casts": "^0.3.1", - "@stdlib/array-safe-casts": "^0.2.1", - "@stdlib/array-same-kind-casts": "^0.2.1", - "@stdlib/array-uint16": "^0.2.1", - "@stdlib/array-uint32": "^0.2.1", - "@stdlib/array-uint8": "^0.2.1", - "@stdlib/array-uint8c": "^0.2.1", - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.1", - "@stdlib/assert-is-same-value": "^0.2.1", - "@stdlib/buffer-alloc-unsafe": "^0.2.1", - "@stdlib/math-base-special-pow": "^0.2.1", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.1", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/utils-constructor-name": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..51552a4 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 0c99834011178de5fd4715c6d3ad2f4d5af6fa48 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 17 Jun 2024 23:13:03 +0000 Subject: [PATCH 098/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c84420e..016967c 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "@stdlib/random-array-discrete-uniform": "^0.2.1", "@stdlib/strided-base-reinterpret-complex128": "^0.2.1", "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/utils-constructor-name": "^0.2.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", "@stdlib/utils-keys": "^0.2.1", From 1e55f4f92dcfd4c8c5807929e07a4ec5992d5f4b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 17 Jun 2024 23:13:30 +0000 Subject: [PATCH 099/208] Remove files --- index.d.ts | 610 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5457 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 10745d2..0000000 --- a/index.d.ts +++ /dev/null @@ -1,610 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index f12b31a..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var u={};s(u,"contains",e),s(u,"hasSameValues",a),s(u,"isAccessorArray",t),s(u,"isBooleanDataType",r),s(u,"isBooleanArray",i),s(u,"isComplexFloatingPointDataType",d),s(u,"isComplexTypedArray",n),s(u,"isComplex64Array",m),s(u,"isComplex128Array",p),s(u,"isDataType",l),s(u,"isFloatingPointDataType",o),s(u,"isIntegerDataType",j),s(u,"isMostlySafeDataTypeCast",y),s(u,"isNumericDataType",h),s(u,"isRealDataType",b),s(u,"isRealFloatingPointDataType",v),s(u,"isSafeDataTypeCast",x),s(u,"isSameKindDataTypeCast",f),s(u,"isSignedIntegerDataType",g),s(u,"isUnsignedIntegerDataType",c);export{u as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 4dd4bbb..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;ymKAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,oBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,iCAAAO,GAUAN,EAAAD,EAAA,sBAAAQ,GAUAP,EAAAD,EAAA,mBAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,aAAAW,GAUAV,EAAAD,EAAA,0BAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,iBAAAgB,GAUAf,EAAAD,EAAA,8BAAAiB,GAUAhB,EAAAD,EAAA,qBAAAkB,GAUAjB,EAAAD,EAAA,yBAAAmB,GAUAlB,EAAAD,EAAA,0BAAAoB,GAUAnB,EAAAD,EAAA,4BAAAqB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 51552a4..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From ae3a014f6bd433951e0187e401c312af3e69f381 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 17 Jun 2024 23:14:10 +0000 Subject: [PATCH 100/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 ---- .github/workflows/publish.yml | 252 -- .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .gitignore | 188 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 730 ---- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 83 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 222 - package.json | 107 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4889 insertions(+), 4473 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f92a6c5..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -143,7 +140,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -208,45 +205,45 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 4fa5655..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index c93484f..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..f12b31a --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var u={};s(u,"contains",e),s(u,"hasSameValues",a),s(u,"isAccessorArray",t),s(u,"isBooleanDataType",r),s(u,"isBooleanArray",i),s(u,"isComplexFloatingPointDataType",d),s(u,"isComplexTypedArray",n),s(u,"isComplex64Array",m),s(u,"isComplex128Array",p),s(u,"isDataType",l),s(u,"isFloatingPointDataType",o),s(u,"isIntegerDataType",j),s(u,"isMostlySafeDataTypeCast",y),s(u,"isNumericDataType",h),s(u,"isRealDataType",b),s(u,"isRealFloatingPointDataType",v),s(u,"isSafeDataTypeCast",x),s(u,"isSameKindDataTypeCast",f),s(u,"isSignedIntegerDataType",g),s(u,"isUnsignedIntegerDataType",c);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..4dd4bbb --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;ymKAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,oBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,iCAAAO,GAUAN,EAAAD,EAAA,sBAAAQ,GAUAP,EAAAD,EAAA,mBAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,aAAAW,GAUAV,EAAAD,EAAA,0BAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,iBAAAgB,GAUAf,EAAAD,EAAA,8BAAAiB,GAUAhB,EAAAD,EAAA,qBAAAkB,GAUAjB,EAAAD,EAAA,yBAAAmB,GAUAlB,EAAAD,EAAA,0BAAAoB,GAUAnB,EAAAD,EAAA,4BAAAqB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index b2057c7..0000000 --- a/lib/index.js +++ /dev/null @@ -1,222 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 016967c..ee2a097 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,87 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.1", - "@stdlib/array-base-assert-has-same-values": "^0.2.1", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.1", - "@stdlib/array-base-assert-is-boolean-data-type": "github:stdlib-js/array-base-assert-is-boolean-data-type#main", - "@stdlib/array-base-assert-is-booleanarray": "github:stdlib-js/array-base-assert-is-booleanarray#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.1", - "@stdlib/array-base-assert-is-complex128array": "^0.2.1", - "@stdlib/array-base-assert-is-complex64array": "^0.2.1", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.1", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.1", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.1", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.1", - "@stdlib/array-base-accessor-getter": "^0.2.1", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.1", - "@stdlib/array-base-ones": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.1", - "@stdlib/array-bool": "github:stdlib-js/array-bool#main", - "@stdlib/array-cartesian-square": "^0.2.1", - "@stdlib/array-complex128": "^0.2.1", - "@stdlib/array-complex64": "^0.2.1", - "@stdlib/array-dtype": "^0.2.1", - "@stdlib/array-dtypes": "^0.2.1", - "@stdlib/array-float32": "^0.2.1", - "@stdlib/array-float64": "^0.2.1", - "@stdlib/array-int16": "^0.2.1", - "@stdlib/array-int32": "^0.2.1", - "@stdlib/array-int8": "^0.2.1", - "@stdlib/array-mostly-safe-casts": "^0.3.1", - "@stdlib/array-safe-casts": "^0.2.1", - "@stdlib/array-same-kind-casts": "^0.2.1", - "@stdlib/array-uint16": "^0.2.1", - "@stdlib/array-uint32": "^0.2.1", - "@stdlib/array-uint8": "^0.2.1", - "@stdlib/array-uint8c": "^0.2.1", - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.1", - "@stdlib/assert-is-same-value": "^0.2.1", - "@stdlib/buffer-alloc-unsafe": "^0.2.1", - "@stdlib/math-base-special-pow": "^0.2.1", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.1", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/utils-constructor-name": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..51552a4 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From dccc2572ad3cbf738e3c7059b0e6b00a87538800 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 29 Jul 2024 12:03:10 +0000 Subject: [PATCH 101/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e01195e..e907448 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 142dbf4f8382a64f7c236d7f92dc7befa936f0d5 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 29 Jul 2024 12:09:11 +0000 Subject: [PATCH 102/208] Remove files --- index.d.ts | 682 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5529 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 0c01238..0000000 --- a/index.d.ts +++ /dev/null @@ -1,682 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index f12b31a..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var u={};s(u,"contains",e),s(u,"hasSameValues",a),s(u,"isAccessorArray",t),s(u,"isBooleanDataType",r),s(u,"isBooleanArray",i),s(u,"isComplexFloatingPointDataType",d),s(u,"isComplexTypedArray",n),s(u,"isComplex64Array",m),s(u,"isComplex128Array",p),s(u,"isDataType",l),s(u,"isFloatingPointDataType",o),s(u,"isIntegerDataType",j),s(u,"isMostlySafeDataTypeCast",y),s(u,"isNumericDataType",h),s(u,"isRealDataType",b),s(u,"isRealFloatingPointDataType",v),s(u,"isSafeDataTypeCast",x),s(u,"isSameKindDataTypeCast",f),s(u,"isSignedIntegerDataType",g),s(u,"isUnsignedIntegerDataType",c);export{u as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 4dd4bbb..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;ymKAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,oBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,iCAAAO,GAUAN,EAAAD,EAAA,sBAAAQ,GAUAP,EAAAD,EAAA,mBAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,aAAAW,GAUAV,EAAAD,EAAA,0BAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,iBAAAgB,GAUAf,EAAAD,EAAA,8BAAAiB,GAUAhB,EAAAD,EAAA,qBAAAkB,GAUAjB,EAAAD,EAAA,yBAAAmB,GAUAlB,EAAAD,EAAA,0BAAAoB,GAUAnB,EAAAD,EAAA,4BAAAqB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 51552a4..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 9a1d139d3187190fa6cc0f0f98b281d9b340c447 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 29 Jul 2024 12:09:38 +0000 Subject: [PATCH 103/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 ---- .github/workflows/publish.yml | 252 -- .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 928 ---- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 83 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 222 - package.json | 108 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4889 insertions(+), 4674 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -143,7 +140,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -208,45 +205,45 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 4fa5655..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index c93484f..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..b1b45ef --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var u={};s(u,"contains",e),s(u,"hasSameValues",a),s(u,"isAccessorArray",t),s(u,"isBooleanDataType",r),s(u,"isBooleanArray",i),s(u,"isComplexFloatingPointDataType",d),s(u,"isComplexTypedArray",n),s(u,"isComplex64Array",m),s(u,"isComplex128Array",p),s(u,"isDataType",l),s(u,"isFloatingPointDataType",o),s(u,"isIntegerDataType",j),s(u,"isMostlySafeDataTypeCast",y),s(u,"isNumericDataType",h),s(u,"isRealDataType",b),s(u,"isRealFloatingPointDataType",v),s(u,"isSafeDataTypeCast",x),s(u,"isSameKindDataTypeCast",f),s(u,"isSignedIntegerDataType",g),s(u,"isUnsignedIntegerDataType",c);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..0ca0f55 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;qoKAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,gBAAAG,GAUAF,EAAAD,EAAA,kBAAAI,GAUAH,EAAAD,EAAA,oBAAAK,GAUAJ,EAAAD,EAAA,iBAAAM,GAUAL,EAAAD,EAAA,iCAAAO,GAUAN,EAAAD,EAAA,sBAAAQ,GAUAP,EAAAD,EAAA,mBAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,aAAAW,GAUAV,EAAAD,EAAA,0BAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,iBAAAgB,GAUAf,EAAAD,EAAA,8BAAAiB,GAUAhB,EAAAD,EAAA,qBAAAkB,GAUAjB,EAAAD,EAAA,yBAAAmB,GAUAlB,EAAAD,EAAA,0BAAAoB,GAUAnB,EAAAD,EAAA,4BAAAqB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index b2057c7..0000000 --- a/lib/index.js +++ /dev/null @@ -1,222 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index e907448..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,88 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-same-values": "^0.2.1", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.1", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..f3bfacf --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 83d8696e82faf6111de0061d9fd937a5dc4e161b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 29 Jul 2024 12:10:26 +0000 Subject: [PATCH 104/208] Update README.md for ESM bundle v0.3.0 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 02c7160..8ef21d9 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ limitations under the License. ## Usage ```javascript -import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@esm/index.mjs'; +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@v0.3.0-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { contains, hasSameValues, isAccessorArray, isBooleanArray, isBooleanDataType, isComplex128Array, isComplex64Array, isComplexFloatingPointDataType, isComplexTypedArray, isDataType, isFloatingPointDataType, isIntegerDataType, isMostlySafeDataTypeCast, isNumericDataType, isRealDataType, isRealFloatingPointDataType, isSafeDataTypeCast, isSameKindDataTypeCast, isSignedIntegerDataType, isUnsignedIntegerDataType } from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@esm/index.mjs'; +import { contains, hasSameValues, isAccessorArray, isBooleanArray, isBooleanDataType, isComplex128Array, isComplex64Array, isComplexFloatingPointDataType, isComplexTypedArray, isDataType, isFloatingPointDataType, isIntegerDataType, isMostlySafeDataTypeCast, isNumericDataType, isRealDataType, isRealFloatingPointDataType, isSafeDataTypeCast, isSameKindDataTypeCast, isSignedIntegerDataType, isUnsignedIntegerDataType } from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@v0.3.0-esm/index.mjs'; ``` #### ns @@ -110,7 +110,7 @@ The namespace exports the following: - - - - From 94185f129c347f60a7454593933cec22bb868562 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 9 Sep 2024 00:24:48 +0000 Subject: [PATCH 108/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 ---- .github/workflows/publish.yml | 252 -- .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 993 ----- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 83 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 231 - package.json | 109 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4889 insertions(+), 4749 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -143,7 +140,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -208,45 +205,45 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 862d26d..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 0693fc1..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..cc69d9e --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var T={};s(T,"contains",e),s(T,"hasEqualValues",a),s(T,"hasSameValues",t),s(T,"isAccessorArray",r),s(T,"isBooleanDataType",i),s(T,"isBooleanArray",d),s(T,"isComplexFloatingPointDataType",n),s(T,"isComplexTypedArray",m),s(T,"isComplex64Array",l),s(T,"isComplex128Array",p),s(T,"isDataType",o),s(T,"isFloatingPointDataType",j),s(T,"isIntegerDataType",y),s(T,"isMostlySafeDataTypeCast",h),s(T,"isNumericDataType",b),s(T,"isRealDataType",v),s(T,"isRealFloatingPointDataType",x),s(T,"isSafeDataTypeCast",f),s(T,"isSameKindDataTypeCast",g),s(T,"isSignedIntegerDataType",c),s(T,"isUnsignedIntegerDataType",u);export{T as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..b1e238a --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;y2KAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,kBAAAK,GAUAJ,EAAAD,EAAA,oBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,sBAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,0BAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,2BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,iBAAAiB,GAUAhB,EAAAD,EAAA,8BAAAkB,GAUAjB,EAAAD,EAAA,qBAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,0BAAAqB,GAUApB,EAAAD,EAAA,4BAAAsB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 77bc3db..0000000 --- a/lib/index.js +++ /dev/null @@ -1,231 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 74e3f79..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,89 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..8730be4 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 995c2074537c0952d32f01a49fb915f22ae21235 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 9 Sep 2024 01:45:27 +0000 Subject: [PATCH 109/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 176a757..c7e87ae 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 28f220ca5b9da9ec73a834dc23542e663ee0e2e3 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 9 Sep 2024 01:45:57 +0000 Subject: [PATCH 110/208] Remove files --- index.d.ts | 682 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5529 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 0c01238..0000000 --- a/index.d.ts +++ /dev/null @@ -1,682 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index cc69d9e..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var T={};s(T,"contains",e),s(T,"hasEqualValues",a),s(T,"hasSameValues",t),s(T,"isAccessorArray",r),s(T,"isBooleanDataType",i),s(T,"isBooleanArray",d),s(T,"isComplexFloatingPointDataType",n),s(T,"isComplexTypedArray",m),s(T,"isComplex64Array",l),s(T,"isComplex128Array",p),s(T,"isDataType",o),s(T,"isFloatingPointDataType",j),s(T,"isIntegerDataType",y),s(T,"isMostlySafeDataTypeCast",h),s(T,"isNumericDataType",b),s(T,"isRealDataType",v),s(T,"isRealFloatingPointDataType",x),s(T,"isSafeDataTypeCast",f),s(T,"isSameKindDataTypeCast",g),s(T,"isSignedIntegerDataType",c),s(T,"isUnsignedIntegerDataType",u);export{T as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index b1e238a..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;y2KAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,gBAAAI,GAUAH,EAAAD,EAAA,kBAAAK,GAUAJ,EAAAD,EAAA,oBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,sBAAAS,GAUAR,EAAAD,EAAA,mBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,0BAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,2BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,iBAAAiB,GAUAhB,EAAAD,EAAA,8BAAAkB,GAUAjB,EAAAD,EAAA,qBAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,0BAAAqB,GAUApB,EAAAD,EAAA,4BAAAsB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 8730be4..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From f66a70d6f8e09b4d0dac8971c2848c40518ac7e4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 9 Sep 2024 01:46:21 +0000 Subject: [PATCH 111/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 ---- .github/workflows/publish.yml | 252 -- .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1019 ----- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 83 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 240 - package.json | 110 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4889 insertions(+), 4785 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -143,7 +140,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -208,45 +205,45 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 1aaa236..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 501ea17..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..cf3d76f --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var D={};s(D,"contains",e),s(D,"hasEqualValues",a),s(D,"hasEqualValuesIndexed",t),s(D,"hasSameValues",r),s(D,"isAccessorArray",i),s(D,"isBooleanDataType",d),s(D,"isBooleanArray",n),s(D,"isComplexFloatingPointDataType",m),s(D,"isComplexTypedArray",l),s(D,"isComplex64Array",p),s(D,"isComplex128Array",o),s(D,"isDataType",j),s(D,"isFloatingPointDataType",y),s(D,"isIntegerDataType",h),s(D,"isMostlySafeDataTypeCast",b),s(D,"isNumericDataType",v),s(D,"isRealDataType",x),s(D,"isRealFloatingPointDataType",f),s(D,"isSafeDataTypeCast",g),s(D,"isSameKindDataTypeCast",c),s(D,"isSignedIntegerDataType",u),s(D,"isUnsignedIntegerDataType",T);export{D as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..2441e58 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;omLAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,iCAAAS,GAUAR,EAAAD,EAAA,sBAAAU,GAUAT,EAAAD,EAAA,mBAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,0BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,2BAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,qBAAAoB,GAUAnB,EAAAD,EAAA,yBAAAqB,GAUApB,EAAAD,EAAA,0BAAAsB,GAUArB,EAAAD,EAAA,4BAAAuB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index aa05696..0000000 --- a/lib/index.js +++ /dev/null @@ -1,240 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index c7e87ae..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,90 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..87edf2c --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 81a23d82da488d8ad241249eba97de3796e69728 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 22 Sep 2024 08:23:46 +0000 Subject: [PATCH 112/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 55324bd..8896623 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 3b7a594f970ca9dab4641ed2c55cb88cb64a4244 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 22 Sep 2024 08:24:14 +0000 Subject: [PATCH 113/208] Remove files --- index.d.ts | 682 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5529 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 0c01238..0000000 --- a/index.d.ts +++ /dev/null @@ -1,682 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index cf3d76f..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var D={};s(D,"contains",e),s(D,"hasEqualValues",a),s(D,"hasEqualValuesIndexed",t),s(D,"hasSameValues",r),s(D,"isAccessorArray",i),s(D,"isBooleanDataType",d),s(D,"isBooleanArray",n),s(D,"isComplexFloatingPointDataType",m),s(D,"isComplexTypedArray",l),s(D,"isComplex64Array",p),s(D,"isComplex128Array",o),s(D,"isDataType",j),s(D,"isFloatingPointDataType",y),s(D,"isIntegerDataType",h),s(D,"isMostlySafeDataTypeCast",b),s(D,"isNumericDataType",v),s(D,"isRealDataType",x),s(D,"isRealFloatingPointDataType",f),s(D,"isSafeDataTypeCast",g),s(D,"isSameKindDataTypeCast",c),s(D,"isSignedIntegerDataType",u),s(D,"isUnsignedIntegerDataType",T);export{D as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 2441e58..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;omLAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,iCAAAS,GAUAR,EAAAD,EAAA,sBAAAU,GAUAT,EAAAD,EAAA,mBAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,0BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,2BAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,qBAAAoB,GAUAnB,EAAAD,EAAA,yBAAAqB,GAUApB,EAAAD,EAAA,0BAAAsB,GAUArB,EAAAD,EAAA,4BAAAuB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 87edf2c..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From a1a355d28c2d65a85a5ca2a620664c893e8857cb Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 22 Sep 2024 08:25:01 +0000 Subject: [PATCH 114/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 ---- .github/workflows/publish.yml | 252 -- .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1046 ----- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 83 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 249 -- package.json | 112 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4889 insertions(+), 4823 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -143,7 +140,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -208,45 +205,45 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 39b9f33..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 191aa69..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 8f9e2b7..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..557c297 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var C={};s(C,"contains",e),s(C,"hasEqualValues",a),s(C,"hasEqualValuesIndexed",t),s(C,"hasSameValues",r),s(C,"isAccessorArray",i),s(C,"isBooleanDataType",d),s(C,"isBooleanArray",n),s(C,"isByteOrder",m),s(C,"isComplexFloatingPointDataType",l),s(C,"isComplexTypedArray",p),s(C,"isComplex64Array",o),s(C,"isComplex128Array",j),s(C,"isDataType",y),s(C,"isFloatingPointDataType",h),s(C,"isIntegerDataType",b),s(C,"isMostlySafeDataTypeCast",v),s(C,"isNumericDataType",x),s(C,"isRealDataType",f),s(C,"isRealFloatingPointDataType",g),s(C,"isSafeDataTypeCast",c),s(C,"isSameKindDataTypeCast",u),s(C,"isSignedIntegerDataType",T),s(C,"isUnsignedIntegerDataType",D);export{C as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..fa627e5 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;+zLAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,cAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,iBAAAmB,GAUAlB,EAAAD,EAAA,8BAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 8ccda86..0000000 --- a/lib/index.js +++ /dev/null @@ -1,249 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 8896623..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,92 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..4b09ab3 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 9b0cbfa866ac4ba1114be1ea1d93fcdeb04a1f03 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 8 Oct 2024 01:18:11 +0000 Subject: [PATCH 115/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 55324bd..8896623 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From fec38129e1afefb80123ce8d0d152d63136ec53d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 8 Oct 2024 01:18:38 +0000 Subject: [PATCH 116/208] Remove files --- index.d.ts | 682 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5529 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 0c01238..0000000 --- a/index.d.ts +++ /dev/null @@ -1,682 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 557c297..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var C={};s(C,"contains",e),s(C,"hasEqualValues",a),s(C,"hasEqualValuesIndexed",t),s(C,"hasSameValues",r),s(C,"isAccessorArray",i),s(C,"isBooleanDataType",d),s(C,"isBooleanArray",n),s(C,"isByteOrder",m),s(C,"isComplexFloatingPointDataType",l),s(C,"isComplexTypedArray",p),s(C,"isComplex64Array",o),s(C,"isComplex128Array",j),s(C,"isDataType",y),s(C,"isFloatingPointDataType",h),s(C,"isIntegerDataType",b),s(C,"isMostlySafeDataTypeCast",v),s(C,"isNumericDataType",x),s(C,"isRealDataType",f),s(C,"isRealFloatingPointDataType",g),s(C,"isSafeDataTypeCast",c),s(C,"isSameKindDataTypeCast",u),s(C,"isSignedIntegerDataType",T),s(C,"isUnsignedIntegerDataType",D);export{C as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index fa627e5..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;+zLAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,cAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,iBAAAmB,GAUAlB,EAAAD,EAAA,8BAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 4b09ab3..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From d3212813818cafeb4dad104bf594e702c0e9208b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 8 Oct 2024 01:19:10 +0000 Subject: [PATCH 117/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 ---- .github/workflows/publish.yml | 252 -- .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1049 ----- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 91 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 249 -- package.json | 112 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4893 insertions(+), 4894 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -207,7 +204,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -272,45 +269,45 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 39b9f33..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 191aa69..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..557c297 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var C={};s(C,"contains",e),s(C,"hasEqualValues",a),s(C,"hasEqualValuesIndexed",t),s(C,"hasSameValues",r),s(C,"isAccessorArray",i),s(C,"isBooleanDataType",d),s(C,"isBooleanArray",n),s(C,"isByteOrder",m),s(C,"isComplexFloatingPointDataType",l),s(C,"isComplexTypedArray",p),s(C,"isComplex64Array",o),s(C,"isComplex128Array",j),s(C,"isDataType",y),s(C,"isFloatingPointDataType",h),s(C,"isIntegerDataType",b),s(C,"isMostlySafeDataTypeCast",v),s(C,"isNumericDataType",x),s(C,"isRealDataType",f),s(C,"isRealFloatingPointDataType",g),s(C,"isSafeDataTypeCast",c),s(C,"isSameKindDataTypeCast",u),s(C,"isSignedIntegerDataType",T),s(C,"isUnsignedIntegerDataType",D);export{C as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..fa627e5 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;+zLAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,cAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,iBAAAmB,GAUAlB,EAAAD,EAAA,8BAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 8ccda86..0000000 --- a/lib/index.js +++ /dev/null @@ -1,249 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 8896623..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,92 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..4b09ab3 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From b95bc3395f756fcee099532b2f42270235f4608a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 20 Nov 2024 03:12:54 +0000 Subject: [PATCH 118/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 55324bd..8896623 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 39016b74b01f942f96b92595786f9fd2ec5366f1 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 20 Nov 2024 03:13:21 +0000 Subject: [PATCH 119/208] Remove files --- index.d.ts | 682 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5529 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 0c01238..0000000 --- a/index.d.ts +++ /dev/null @@ -1,682 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 557c297..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var C={};s(C,"contains",e),s(C,"hasEqualValues",a),s(C,"hasEqualValuesIndexed",t),s(C,"hasSameValues",r),s(C,"isAccessorArray",i),s(C,"isBooleanDataType",d),s(C,"isBooleanArray",n),s(C,"isByteOrder",m),s(C,"isComplexFloatingPointDataType",l),s(C,"isComplexTypedArray",p),s(C,"isComplex64Array",o),s(C,"isComplex128Array",j),s(C,"isDataType",y),s(C,"isFloatingPointDataType",h),s(C,"isIntegerDataType",b),s(C,"isMostlySafeDataTypeCast",v),s(C,"isNumericDataType",x),s(C,"isRealDataType",f),s(C,"isRealFloatingPointDataType",g),s(C,"isSafeDataTypeCast",c),s(C,"isSameKindDataTypeCast",u),s(C,"isSignedIntegerDataType",T),s(C,"isUnsignedIntegerDataType",D);export{C as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index fa627e5..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;+zLAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,cAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,iBAAAmB,GAUAlB,EAAAD,EAAA,8BAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 4b09ab3..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 5dd51f7cbd78aabf91d519ebd0660f6e8dc10ae5 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 20 Nov 2024 03:13:43 +0000 Subject: [PATCH 120/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1075 ---- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 91 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 249 - package.json | 112 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4893 insertions(+), 5025 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -207,7 +204,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -272,45 +269,45 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 39b9f33..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 191aa69..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..557c297 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var C={};s(C,"contains",e),s(C,"hasEqualValues",a),s(C,"hasEqualValuesIndexed",t),s(C,"hasSameValues",r),s(C,"isAccessorArray",i),s(C,"isBooleanDataType",d),s(C,"isBooleanArray",n),s(C,"isByteOrder",m),s(C,"isComplexFloatingPointDataType",l),s(C,"isComplexTypedArray",p),s(C,"isComplex64Array",o),s(C,"isComplex128Array",j),s(C,"isDataType",y),s(C,"isFloatingPointDataType",h),s(C,"isIntegerDataType",b),s(C,"isMostlySafeDataTypeCast",v),s(C,"isNumericDataType",x),s(C,"isRealDataType",f),s(C,"isRealFloatingPointDataType",g),s(C,"isSafeDataTypeCast",c),s(C,"isSameKindDataTypeCast",u),s(C,"isSignedIntegerDataType",T),s(C,"isUnsignedIntegerDataType",D);export{C as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..fa627e5 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;+zLAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,cAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,iBAAAmB,GAUAlB,EAAAD,EAAA,8BAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 8ccda86..0000000 --- a/lib/index.js +++ /dev/null @@ -1,249 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 8896623..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,92 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..4b09ab3 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 30c45d83ca689c1e1aafd9a8b1662949d7535107 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 21 Nov 2024 03:16:21 +0000 Subject: [PATCH 121/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 55324bd..8896623 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 6cf325e085a0ee8985bdd58677d1f1f21d4dfdf8 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 21 Nov 2024 03:16:56 +0000 Subject: [PATCH 122/208] Remove files --- index.d.ts | 743 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5590 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 3fcbbb1..0000000 --- a/index.d.ts +++ /dev/null @@ -1,743 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 557c297..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var C={};s(C,"contains",e),s(C,"hasEqualValues",a),s(C,"hasEqualValuesIndexed",t),s(C,"hasSameValues",r),s(C,"isAccessorArray",i),s(C,"isBooleanDataType",d),s(C,"isBooleanArray",n),s(C,"isByteOrder",m),s(C,"isComplexFloatingPointDataType",l),s(C,"isComplexTypedArray",p),s(C,"isComplex64Array",o),s(C,"isComplex128Array",j),s(C,"isDataType",y),s(C,"isFloatingPointDataType",h),s(C,"isIntegerDataType",b),s(C,"isMostlySafeDataTypeCast",v),s(C,"isNumericDataType",x),s(C,"isRealDataType",f),s(C,"isRealFloatingPointDataType",g),s(C,"isSafeDataTypeCast",c),s(C,"isSameKindDataTypeCast",u),s(C,"isSignedIntegerDataType",T),s(C,"isUnsignedIntegerDataType",D);export{C as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index fa627e5..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;+zLAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,cAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,iBAAAmB,GAUAlB,EAAAD,EAAA,8BAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 4b09ab3..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From b86fb66b9eebc814044ccc72f5d2df85b8eb6474 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 21 Nov 2024 03:17:21 +0000 Subject: [PATCH 123/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1076 ---- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 97 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 249 - package.json | 112 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4896 insertions(+), 5029 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -210,7 +207,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -275,51 +272,51 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 39b9f33..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 191aa69..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..557c297 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var C={};s(C,"contains",e),s(C,"hasEqualValues",a),s(C,"hasEqualValuesIndexed",t),s(C,"hasSameValues",r),s(C,"isAccessorArray",i),s(C,"isBooleanDataType",d),s(C,"isBooleanArray",n),s(C,"isByteOrder",m),s(C,"isComplexFloatingPointDataType",l),s(C,"isComplexTypedArray",p),s(C,"isComplex64Array",o),s(C,"isComplex128Array",j),s(C,"isDataType",y),s(C,"isFloatingPointDataType",h),s(C,"isIntegerDataType",b),s(C,"isMostlySafeDataTypeCast",v),s(C,"isNumericDataType",x),s(C,"isRealDataType",f),s(C,"isRealFloatingPointDataType",g),s(C,"isSafeDataTypeCast",c),s(C,"isSameKindDataTypeCast",u),s(C,"isSignedIntegerDataType",T),s(C,"isUnsignedIntegerDataType",D);export{C as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..fa627e5 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;+zLAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,cAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,iBAAAmB,GAUAlB,EAAAD,EAAA,8BAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 8ccda86..0000000 --- a/lib/index.js +++ /dev/null @@ -1,249 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 8896623..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,92 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..4b09ab3 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From c8d35373caccc31caf220c9fdf844e5419644094 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 11 Jan 2025 22:47:29 +0000 Subject: [PATCH 124/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d194c33..748e3f4 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 0df507208eddce5ec7589ae0603fbbf36e80bd58 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 11 Jan 2025 22:47:56 +0000 Subject: [PATCH 125/208] Remove files --- index.d.ts | 743 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5590 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 3fcbbb1..0000000 --- a/index.d.ts +++ /dev/null @@ -1,743 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 557c297..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var C={};s(C,"contains",e),s(C,"hasEqualValues",a),s(C,"hasEqualValuesIndexed",t),s(C,"hasSameValues",r),s(C,"isAccessorArray",i),s(C,"isBooleanDataType",d),s(C,"isBooleanArray",n),s(C,"isByteOrder",m),s(C,"isComplexFloatingPointDataType",l),s(C,"isComplexTypedArray",p),s(C,"isComplex64Array",o),s(C,"isComplex128Array",j),s(C,"isDataType",y),s(C,"isFloatingPointDataType",h),s(C,"isIntegerDataType",b),s(C,"isMostlySafeDataTypeCast",v),s(C,"isNumericDataType",x),s(C,"isRealDataType",f),s(C,"isRealFloatingPointDataType",g),s(C,"isSafeDataTypeCast",c),s(C,"isSameKindDataTypeCast",u),s(C,"isSignedIntegerDataType",T),s(C,"isUnsignedIntegerDataType",D);export{C as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index fa627e5..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isUnsignedIntegerDataType"],"mappings":";;+zLAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,cAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,iBAAAmB,GAUAlB,EAAAD,EAAA,8BAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 4b09ab3..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 120981984ebd52db4b7ba22cd01b7ebbeffa0637 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 11 Jan 2025 22:48:35 +0000 Subject: [PATCH 126/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1102 ---- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 97 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 258 - package.json | 114 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4896 insertions(+), 5066 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0779e8a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -210,7 +207,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -275,51 +272,51 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 9a03329..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index c91eeb4..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..da1f1e7 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var C={};s(C,"contains",e),s(C,"hasEqualValues",a),s(C,"hasEqualValuesIndexed",t),s(C,"hasSameValues",r),s(C,"isAccessorArray",i),s(C,"isBooleanDataType",d),s(C,"isBooleanArray",n),s(C,"isByteOrder",m),s(C,"isComplexFloatingPointDataType",l),s(C,"isComplexTypedArray",p),s(C,"isComplex64Array",o),s(C,"isComplex128Array",j),s(C,"isDataType",y),s(C,"isFloatingPointDataType",h),s(C,"isIntegerDataType",b),s(C,"isMostlySafeDataTypeCast",v),s(C,"isNumericDataType",x),s(C,"isRealDataType",f),s(C,"isRealFloatingPointDataType",g),s(C,"isSafeDataTypeCast",c),s(C,"isSameKindDataTypeCast",u),s(C,"isSignedIntegerDataType",T),s(C,"isSortedAscending",D),s(C,"isUnsignedIntegerDataType",A);export{C as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..02e1539 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;4iMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,cAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,iBAAAmB,GAUAlB,EAAAD,EAAA,8BAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,oBAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 591dc6a..0000000 --- a/lib/index.js +++ /dev/null @@ -1,258 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 748e3f4..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,94 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "github:stdlib-js/array-base-assert-is-sorted-ascending#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..de82ae0 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 7711b4a4f721fda429c1d30dc7c7498e01bc01e6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 12 Jan 2025 03:25:18 +0000 Subject: [PATCH 127/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d194c33..748e3f4 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 24b5df9284b5aac6d927192f0f4f8c84cb45a51d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 12 Jan 2025 03:25:41 +0000 Subject: [PATCH 128/208] Remove files --- index.d.ts | 743 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5590 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 3fcbbb1..0000000 --- a/index.d.ts +++ /dev/null @@ -1,743 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index da1f1e7..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var C={};s(C,"contains",e),s(C,"hasEqualValues",a),s(C,"hasEqualValuesIndexed",t),s(C,"hasSameValues",r),s(C,"isAccessorArray",i),s(C,"isBooleanDataType",d),s(C,"isBooleanArray",n),s(C,"isByteOrder",m),s(C,"isComplexFloatingPointDataType",l),s(C,"isComplexTypedArray",p),s(C,"isComplex64Array",o),s(C,"isComplex128Array",j),s(C,"isDataType",y),s(C,"isFloatingPointDataType",h),s(C,"isIntegerDataType",b),s(C,"isMostlySafeDataTypeCast",v),s(C,"isNumericDataType",x),s(C,"isRealDataType",f),s(C,"isRealFloatingPointDataType",g),s(C,"isSafeDataTypeCast",c),s(C,"isSameKindDataTypeCast",u),s(C,"isSignedIntegerDataType",T),s(C,"isSortedAscending",D),s(C,"isUnsignedIntegerDataType",A);export{C as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 02e1539..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;4iMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,cAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,iBAAAmB,GAUAlB,EAAAD,EAAA,8BAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,oBAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index de82ae0..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From bdc291b99afea23307c5f8f0d55f8fbddd2e552d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 12 Jan 2025 03:26:10 +0000 Subject: [PATCH 129/208] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1103 ---- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 99 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 258 - package.json | 114 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4897 insertions(+), 5068 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0779e8a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e6cc7ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -211,7 +208,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -276,53 +273,53 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 9a03329..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index c91eeb4..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..da1f1e7 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var C={};s(C,"contains",e),s(C,"hasEqualValues",a),s(C,"hasEqualValuesIndexed",t),s(C,"hasSameValues",r),s(C,"isAccessorArray",i),s(C,"isBooleanDataType",d),s(C,"isBooleanArray",n),s(C,"isByteOrder",m),s(C,"isComplexFloatingPointDataType",l),s(C,"isComplexTypedArray",p),s(C,"isComplex64Array",o),s(C,"isComplex128Array",j),s(C,"isDataType",y),s(C,"isFloatingPointDataType",h),s(C,"isIntegerDataType",b),s(C,"isMostlySafeDataTypeCast",v),s(C,"isNumericDataType",x),s(C,"isRealDataType",f),s(C,"isRealFloatingPointDataType",g),s(C,"isSafeDataTypeCast",c),s(C,"isSameKindDataTypeCast",u),s(C,"isSignedIntegerDataType",T),s(C,"isSortedAscending",D),s(C,"isUnsignedIntegerDataType",A);export{C as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..02e1539 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;4iMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,cAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,iBAAAmB,GAUAlB,EAAAD,EAAA,8BAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,oBAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 591dc6a..0000000 --- a/lib/index.js +++ /dev/null @@ -1,258 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 748e3f4..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,94 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "github:stdlib-js/array-base-assert-is-sorted-ascending#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..de82ae0 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 0c1261e96bf1d55e102140b943fd50b3cc928358 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 24 Mar 2025 00:32:20 +0000 Subject: [PATCH 130/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d194c33..748e3f4 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From ab9023159a3536b1036f120d67410177c941f53c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 24 Mar 2025 00:33:18 +0000 Subject: [PATCH 131/208] Remove files --- index.d.ts | 743 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5590 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 3fcbbb1..0000000 --- a/index.d.ts +++ /dev/null @@ -1,743 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index da1f1e7..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var C={};s(C,"contains",e),s(C,"hasEqualValues",a),s(C,"hasEqualValuesIndexed",t),s(C,"hasSameValues",r),s(C,"isAccessorArray",i),s(C,"isBooleanDataType",d),s(C,"isBooleanArray",n),s(C,"isByteOrder",m),s(C,"isComplexFloatingPointDataType",l),s(C,"isComplexTypedArray",p),s(C,"isComplex64Array",o),s(C,"isComplex128Array",j),s(C,"isDataType",y),s(C,"isFloatingPointDataType",h),s(C,"isIntegerDataType",b),s(C,"isMostlySafeDataTypeCast",v),s(C,"isNumericDataType",x),s(C,"isRealDataType",f),s(C,"isRealFloatingPointDataType",g),s(C,"isSafeDataTypeCast",c),s(C,"isSameKindDataTypeCast",u),s(C,"isSignedIntegerDataType",T),s(C,"isSortedAscending",D),s(C,"isUnsignedIntegerDataType",A);export{C as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 02e1539..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;4iMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,cAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,iBAAAmB,GAUAlB,EAAAD,EAAA,8BAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,oBAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index de82ae0..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From e6d673047b31b4c158efa280e20bd7586e90c1ee Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 24 Mar 2025 00:33:58 +0000 Subject: [PATCH 132/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1105 ---- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 99 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 258 - package.json | 114 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 41 files changed, 4897 insertions(+), 5074 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index b5b1c64..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2025-03-24T00:31:57.071Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -211,7 +208,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -276,53 +273,53 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 9a03329..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index c91eeb4..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..da1f1e7 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var C={};s(C,"contains",e),s(C,"hasEqualValues",a),s(C,"hasEqualValuesIndexed",t),s(C,"hasSameValues",r),s(C,"isAccessorArray",i),s(C,"isBooleanDataType",d),s(C,"isBooleanArray",n),s(C,"isByteOrder",m),s(C,"isComplexFloatingPointDataType",l),s(C,"isComplexTypedArray",p),s(C,"isComplex64Array",o),s(C,"isComplex128Array",j),s(C,"isDataType",y),s(C,"isFloatingPointDataType",h),s(C,"isIntegerDataType",b),s(C,"isMostlySafeDataTypeCast",v),s(C,"isNumericDataType",x),s(C,"isRealDataType",f),s(C,"isRealFloatingPointDataType",g),s(C,"isSafeDataTypeCast",c),s(C,"isSameKindDataTypeCast",u),s(C,"isSignedIntegerDataType",T),s(C,"isSortedAscending",D),s(C,"isUnsignedIntegerDataType",A);export{C as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..02e1539 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;4iMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,cAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,iBAAAmB,GAUAlB,EAAAD,EAAA,8BAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,oBAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 591dc6a..0000000 --- a/lib/index.js +++ /dev/null @@ -1,258 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 748e3f4..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,94 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "github:stdlib-js/array-base-assert-is-sorted-ascending#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..de82ae0 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 15f7a654dcfe137510474712bd3718f0a4151f5a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 7 May 2025 03:44:10 +0000 Subject: [PATCH 133/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 37fc1eb..33a0450 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/string-from-code-point": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", From e67ed292b9aa7dae604c7678fcd16622504925d9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 7 May 2025 03:44:32 +0000 Subject: [PATCH 134/208] Remove files --- index.d.ts | 776 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5623 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 20bcb67..0000000 --- a/index.d.ts +++ /dev/null @@ -1,776 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index da1f1e7..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var C={};s(C,"contains",e),s(C,"hasEqualValues",a),s(C,"hasEqualValuesIndexed",t),s(C,"hasSameValues",r),s(C,"isAccessorArray",i),s(C,"isBooleanDataType",d),s(C,"isBooleanArray",n),s(C,"isByteOrder",m),s(C,"isComplexFloatingPointDataType",l),s(C,"isComplexTypedArray",p),s(C,"isComplex64Array",o),s(C,"isComplex128Array",j),s(C,"isDataType",y),s(C,"isFloatingPointDataType",h),s(C,"isIntegerDataType",b),s(C,"isMostlySafeDataTypeCast",v),s(C,"isNumericDataType",x),s(C,"isRealDataType",f),s(C,"isRealFloatingPointDataType",g),s(C,"isSafeDataTypeCast",c),s(C,"isSameKindDataTypeCast",u),s(C,"isSignedIntegerDataType",T),s(C,"isSortedAscending",D),s(C,"isUnsignedIntegerDataType",A);export{C as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 02e1539..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;4iMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,cAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,iBAAAmB,GAUAlB,EAAAD,EAAA,8BAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,oBAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index de82ae0..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 9ac3bd654632c369c59eddf32a4ddbd498a69367 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 7 May 2025 03:45:10 +0000 Subject: [PATCH 135/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 419 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 99 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 - package.json | 122 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4897 insertions(+), 4404 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -211,7 +208,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -276,53 +273,53 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 53de706..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"anyHasProp",require('@stdlib/array-base-assert-any-has-property/dist'));r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index cdea918..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name anyHasProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-property}\n*/\nsetReadOnly( ns, 'anyHasProp', require( '@stdlib/array-base-assert-any-has-property' ) );\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4CAA6C,CAAE,EASvFD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..bcba4a9 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";export{default as anyHasProp}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var S={};s(S,"anyHasProp",e),s(S,"contains",a),s(S,"hasEqualValues",t),s(S,"hasEqualValuesIndexed",r),s(S,"hasSameValues",i),s(S,"isAccessorArray",d),s(S,"isBooleanDataType",n),s(S,"isBooleanArray",m),s(S,"isByteOrder",l),s(S,"isComplexFloatingPointDataType",p),s(S,"isComplexTypedArray",o),s(S,"isComplex64Array",j),s(S,"isComplex128Array",y),s(S,"isDataType",h),s(S,"isFloatingPointDataType",b),s(S,"isIntegerDataType",v),s(S,"isMostlySafeDataTypeCast",x),s(S,"isNumericDataType",f),s(S,"isRealDataType",g),s(S,"isRealFloatingPointDataType",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",T),s(S,"isSignedIntegerDataType",D),s(S,"isSortedAscending",A),s(S,"isUnsignedIntegerDataType",C);export{S as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..3326631 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name anyHasProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-property}\n*/\nimport anyHasProp from '@stdlib/array-base-assert-any-has-property';\nsetReadOnly( ns, 'anyHasProp', anyHasProp );\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyHasProp","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;4wMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,WAAAG,GAUAF,EAAAD,EAAA,iBAAAI,GAUAH,EAAAD,EAAA,wBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,kBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,iBAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,sBAAAY,GAUAX,EAAAD,EAAA,mBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,aAAAe,GAUAd,EAAAD,EAAA,0BAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,2BAAAkB,GAUAjB,EAAAD,EAAA,oBAAAmB,GAUAlB,EAAAD,EAAA,iBAAAoB,GAUAnB,EAAAD,EAAA,8BAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,oBAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2e0463a..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name anyHasProp -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/any-has-property} -*/ -setReadOnly( ns, 'anyHasProp', require( '@stdlib/array-base-assert-any-has-property' ) ); - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 33a0450..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,102 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-any-has-property": "github:stdlib-js/array-base-assert-any-has-property#main", - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "github:stdlib-js/array-base-assert-is-sorted-ascending#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-resolve-getter": "^0.2.2", - "@stdlib/array-base-to-accessor-array": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-filled": "^0.2.1", - "@stdlib/array-filled-by": "^0.2.1", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-has-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/string-from-code-point": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..4463f72 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 0ca5b4cc6bd05a5e66297707ca49108bd44c9557 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 7 May 2025 03:52:17 +0000 Subject: [PATCH 136/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4cbf717..81ae92e 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/string-from-code-point": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", From 3205a774fa04a565d0b1357fa99eb7c0de469463 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 7 May 2025 03:52:36 +0000 Subject: [PATCH 137/208] Remove files --- index.d.ts | 776 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5623 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 20bcb67..0000000 --- a/index.d.ts +++ /dev/null @@ -1,776 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index bcba4a9..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";export{default as anyHasProp}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var S={};s(S,"anyHasProp",e),s(S,"contains",a),s(S,"hasEqualValues",t),s(S,"hasEqualValuesIndexed",r),s(S,"hasSameValues",i),s(S,"isAccessorArray",d),s(S,"isBooleanDataType",n),s(S,"isBooleanArray",m),s(S,"isByteOrder",l),s(S,"isComplexFloatingPointDataType",p),s(S,"isComplexTypedArray",o),s(S,"isComplex64Array",j),s(S,"isComplex128Array",y),s(S,"isDataType",h),s(S,"isFloatingPointDataType",b),s(S,"isIntegerDataType",v),s(S,"isMostlySafeDataTypeCast",x),s(S,"isNumericDataType",f),s(S,"isRealDataType",g),s(S,"isRealFloatingPointDataType",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",T),s(S,"isSignedIntegerDataType",D),s(S,"isSortedAscending",A),s(S,"isUnsignedIntegerDataType",C);export{S as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 3326631..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name anyHasProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-property}\n*/\nimport anyHasProp from '@stdlib/array-base-assert-any-has-property';\nsetReadOnly( ns, 'anyHasProp', anyHasProp );\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyHasProp","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;4wMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,WAAAG,GAUAF,EAAAD,EAAA,iBAAAI,GAUAH,EAAAD,EAAA,wBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,kBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,iBAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,sBAAAY,GAUAX,EAAAD,EAAA,mBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,aAAAe,GAUAd,EAAAD,EAAA,0BAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,2BAAAkB,GAUAjB,EAAAD,EAAA,oBAAAmB,GAUAlB,EAAAD,EAAA,iBAAAoB,GAUAnB,EAAAD,EAAA,8BAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,oBAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 4463f72..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 2bb62e46ec193a9c63bca25dfa92014c9bc19a59 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 7 May 2025 03:53:21 +0000 Subject: [PATCH 138/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 424 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 99 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 276 - package.json | 123 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4897 insertions(+), 4419 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -211,7 +208,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -276,53 +273,53 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 1ec045c..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"anyHasOwnProp",require('@stdlib/array-base-assert-any-has-own-property/dist'));r(e,"anyHasProp",require('@stdlib/array-base-assert-any-has-property/dist'));r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 3cb661d..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name anyHasOwnProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-own-property}\n*/\nsetReadOnly( ns, 'anyHasOwnProp', require( '@stdlib/array-base-assert-any-has-own-property' ) );\n\n/**\n* @name anyHasProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-property}\n*/\nsetReadOnly( ns, 'anyHasProp', require( '@stdlib/array-base-assert-any-has-property' ) );\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,gDAAiD,CAAE,EAS9FD,EAAaC,EAAI,aAAc,QAAS,4CAA6C,CAAE,EASvFD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..da72bb3 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-own-property@esm/index.mjs";export{default as anyHasOwnProp}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-own-property@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";export{default as anyHasProp}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var P={};s(P,"anyHasOwnProp",e),s(P,"anyHasProp",a),s(P,"contains",t),s(P,"hasEqualValues",r),s(P,"hasEqualValuesIndexed",i),s(P,"hasSameValues",d),s(P,"isAccessorArray",n),s(P,"isBooleanDataType",m),s(P,"isBooleanArray",l),s(P,"isByteOrder",p),s(P,"isComplexFloatingPointDataType",o),s(P,"isComplexTypedArray",j),s(P,"isComplex64Array",y),s(P,"isComplex128Array",h),s(P,"isDataType",b),s(P,"isFloatingPointDataType",v),s(P,"isIntegerDataType",x),s(P,"isMostlySafeDataTypeCast",f),s(P,"isNumericDataType",g),s(P,"isRealDataType",c),s(P,"isRealFloatingPointDataType",u),s(P,"isSafeDataTypeCast",T),s(P,"isSameKindDataTypeCast",D),s(P,"isSignedIntegerDataType",A),s(P,"isSortedAscending",C),s(P,"isUnsignedIntegerDataType",S);export{P as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..571faaa --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name anyHasOwnProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-own-property}\n*/\nimport anyHasOwnProp from '@stdlib/array-base-assert-any-has-own-property';\nsetReadOnly( ns, 'anyHasOwnProp', anyHasOwnProp );\n\n/**\n* @name anyHasProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-property}\n*/\nimport anyHasProp from '@stdlib/array-base-assert-any-has-property';\nsetReadOnly( ns, 'anyHasProp', anyHasProp );\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyHasOwnProp","anyHasProp","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;u/MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,aAAAG,GAUAF,EAAAD,EAAA,WAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 44a3af0..0000000 --- a/lib/index.js +++ /dev/null @@ -1,276 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name anyHasOwnProp -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/any-has-own-property} -*/ -setReadOnly( ns, 'anyHasOwnProp', require( '@stdlib/array-base-assert-any-has-own-property' ) ); - -/** -* @name anyHasProp -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/any-has-property} -*/ -setReadOnly( ns, 'anyHasProp', require( '@stdlib/array-base-assert-any-has-property' ) ); - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 81ae92e..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,103 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-any-has-own-property": "github:stdlib-js/array-base-assert-any-has-own-property#main", - "@stdlib/array-base-assert-any-has-property": "github:stdlib-js/array-base-assert-any-has-property#main", - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "github:stdlib-js/array-base-assert-is-sorted-ascending#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-resolve-getter": "^0.2.2", - "@stdlib/array-base-to-accessor-array": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-filled": "^0.2.1", - "@stdlib/array-filled-by": "^0.2.1", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-has-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/string-from-code-point": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..a65947e --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From efeee80c5420e322d75da8ead2a7cb5b694466f2 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 7 May 2025 06:36:51 +0000 Subject: [PATCH 139/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9b1cbf..f9642f0 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/string-from-code-point": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", From e0289e2c10a007ac55dac72a048fbd26b33b0d72 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 7 May 2025 06:37:15 +0000 Subject: [PATCH 140/208] Remove files --- index.d.ts | 776 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5623 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 20bcb67..0000000 --- a/index.d.ts +++ /dev/null @@ -1,776 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index da72bb3..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-own-property@esm/index.mjs";export{default as anyHasOwnProp}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-own-property@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";export{default as anyHasProp}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var P={};s(P,"anyHasOwnProp",e),s(P,"anyHasProp",a),s(P,"contains",t),s(P,"hasEqualValues",r),s(P,"hasEqualValuesIndexed",i),s(P,"hasSameValues",d),s(P,"isAccessorArray",n),s(P,"isBooleanDataType",m),s(P,"isBooleanArray",l),s(P,"isByteOrder",p),s(P,"isComplexFloatingPointDataType",o),s(P,"isComplexTypedArray",j),s(P,"isComplex64Array",y),s(P,"isComplex128Array",h),s(P,"isDataType",b),s(P,"isFloatingPointDataType",v),s(P,"isIntegerDataType",x),s(P,"isMostlySafeDataTypeCast",f),s(P,"isNumericDataType",g),s(P,"isRealDataType",c),s(P,"isRealFloatingPointDataType",u),s(P,"isSafeDataTypeCast",T),s(P,"isSameKindDataTypeCast",D),s(P,"isSignedIntegerDataType",A),s(P,"isSortedAscending",C),s(P,"isUnsignedIntegerDataType",S);export{P as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 571faaa..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name anyHasOwnProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-own-property}\n*/\nimport anyHasOwnProp from '@stdlib/array-base-assert-any-has-own-property';\nsetReadOnly( ns, 'anyHasOwnProp', anyHasOwnProp );\n\n/**\n* @name anyHasProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-property}\n*/\nimport anyHasProp from '@stdlib/array-base-assert-any-has-property';\nsetReadOnly( ns, 'anyHasProp', anyHasProp );\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyHasOwnProp","anyHasProp","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;u/MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,aAAAG,GAUAF,EAAAD,EAAA,WAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index a65947e..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From e1a1991572b660deba92230533c3535aa23c1e15 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 7 May 2025 06:37:53 +0000 Subject: [PATCH 141/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 432 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 99 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 294 -- package.json | 125 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4897 insertions(+), 4447 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -211,7 +208,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -276,53 +273,53 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 1d32a7d..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"anyHasOwnProp",require('@stdlib/array-base-assert-any-has-own-property/dist'));r(e,"anyHasProp",require('@stdlib/array-base-assert-any-has-property/dist'));r(e,"anyIsEntry",require('@stdlib/array-base-assert-any-is-entry/dist'));r(e,"anyIsEntryIn",require('@stdlib/array-base-assert-any-is-entry-in/dist'));r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 5529b44..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name anyHasOwnProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-own-property}\n*/\nsetReadOnly( ns, 'anyHasOwnProp', require( '@stdlib/array-base-assert-any-has-own-property' ) );\n\n/**\n* @name anyHasProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-property}\n*/\nsetReadOnly( ns, 'anyHasProp', require( '@stdlib/array-base-assert-any-has-property' ) );\n\n/**\n* @name anyIsEntry\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-is-entry}\n*/\nsetReadOnly( ns, 'anyIsEntry', require( '@stdlib/array-base-assert-any-is-entry' ) );\n\n/**\n* @name anyIsEntryIn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-is-entry-in}\n*/\nsetReadOnly( ns, 'anyIsEntryIn', require( '@stdlib/array-base-assert-any-is-entry-in' ) );\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,gDAAiD,CAAE,EAS9FD,EAAaC,EAAI,aAAc,QAAS,4CAA6C,CAAE,EASvFD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..2de6015 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-own-property@esm/index.mjs";export{default as anyHasOwnProp}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-own-property@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";export{default as anyHasProp}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry@esm/index.mjs";export{default as anyIsEntry}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry-in@esm/index.mjs";export{default as anyIsEntryIn}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry-in@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"anyHasOwnProp",e),s(q,"anyHasProp",a),s(q,"anyIsEntry",t),s(q,"anyIsEntryIn",r),s(q,"contains",i),s(q,"hasEqualValues",d),s(q,"hasEqualValuesIndexed",n),s(q,"hasSameValues",m),s(q,"isAccessorArray",l),s(q,"isBooleanDataType",p),s(q,"isBooleanArray",o),s(q,"isByteOrder",j),s(q,"isComplexFloatingPointDataType",y),s(q,"isComplexTypedArray",h),s(q,"isComplex64Array",b),s(q,"isComplex128Array",x),s(q,"isDataType",v),s(q,"isFloatingPointDataType",f),s(q,"isIntegerDataType",g),s(q,"isMostlySafeDataTypeCast",c),s(q,"isNumericDataType",u),s(q,"isRealDataType",T),s(q,"isRealFloatingPointDataType",D),s(q,"isSafeDataTypeCast",A),s(q,"isSameKindDataTypeCast",C),s(q,"isSignedIntegerDataType",I),s(q,"isSortedAscending",S),s(q,"isUnsignedIntegerDataType",P);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..0075b74 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name anyHasOwnProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-own-property}\n*/\nimport anyHasOwnProp from '@stdlib/array-base-assert-any-has-own-property';\nsetReadOnly( ns, 'anyHasOwnProp', anyHasOwnProp );\n\n/**\n* @name anyHasProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-property}\n*/\nimport anyHasProp from '@stdlib/array-base-assert-any-has-property';\nsetReadOnly( ns, 'anyHasProp', anyHasProp );\n\n/**\n* @name anyIsEntry\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-is-entry}\n*/\nimport anyIsEntry from '@stdlib/array-base-assert-any-is-entry';\nsetReadOnly( ns, 'anyIsEntry', anyIsEntry );\n\n/**\n* @name anyIsEntryIn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-is-entry-in}\n*/\nimport anyIsEntryIn from '@stdlib/array-base-assert-any-is-entry-in';\nsetReadOnly( ns, 'anyIsEntryIn', anyIsEntryIn );\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyHasOwnProp","anyHasProp","anyIsEntry","anyIsEntryIn","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;+6NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,aAAAG,GAUAF,EAAAD,EAAA,aAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,WAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,wBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,kBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,iBAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,iCAAAc,GAUAb,EAAAD,EAAA,sBAAAe,GAUAd,EAAAD,EAAA,mBAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,aAAAkB,GAUAjB,EAAAD,EAAA,0BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,2BAAAqB,GAUApB,EAAAD,EAAA,oBAAAsB,GAUArB,EAAAD,EAAA,iBAAAuB,GAUAtB,EAAAD,EAAA,8BAAAwB,GAUAvB,EAAAD,EAAA,qBAAAyB,GAUAxB,EAAAD,EAAA,yBAAA0B,GAUAzB,EAAAD,EAAA,0BAAA2B,GAUA1B,EAAAD,EAAA,oBAAA4B,GAUA3B,EAAAD,EAAA,4BAAA6B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index b3a7235..0000000 --- a/lib/index.js +++ /dev/null @@ -1,294 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name anyHasOwnProp -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/any-has-own-property} -*/ -setReadOnly( ns, 'anyHasOwnProp', require( '@stdlib/array-base-assert-any-has-own-property' ) ); - -/** -* @name anyHasProp -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/any-has-property} -*/ -setReadOnly( ns, 'anyHasProp', require( '@stdlib/array-base-assert-any-has-property' ) ); - -/** -* @name anyIsEntry -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/any-is-entry} -*/ -setReadOnly( ns, 'anyIsEntry', require( '@stdlib/array-base-assert-any-is-entry' ) ); - -/** -* @name anyIsEntryIn -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/any-is-entry-in} -*/ -setReadOnly( ns, 'anyIsEntryIn', require( '@stdlib/array-base-assert-any-is-entry-in' ) ); - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index f9642f0..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,105 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-any-has-own-property": "github:stdlib-js/array-base-assert-any-has-own-property#main", - "@stdlib/array-base-assert-any-has-property": "github:stdlib-js/array-base-assert-any-has-property#main", - "@stdlib/array-base-assert-any-is-entry": "github:stdlib-js/array-base-assert-any-is-entry#main", - "@stdlib/array-base-assert-any-is-entry-in": "github:stdlib-js/array-base-assert-any-is-entry-in#main", - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "github:stdlib-js/array-base-assert-is-sorted-ascending#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-resolve-getter": "^0.2.2", - "@stdlib/array-base-to-accessor-array": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-filled": "^0.2.1", - "@stdlib/array-filled-by": "^0.2.1", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-has-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/string-from-code-point": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..8e3a722 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 80c40d7d3ae52897d5c00bd9b0550e14021d814a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 8 May 2025 07:48:32 +0000 Subject: [PATCH 142/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9b1cbf..f9642f0 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/string-from-code-point": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", From 930a9299e5d0b571cabe4014006c566bb0471c86 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 8 May 2025 07:48:57 +0000 Subject: [PATCH 143/208] Remove files --- index.d.ts | 776 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5623 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 20bcb67..0000000 --- a/index.d.ts +++ /dev/null @@ -1,776 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 2de6015..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-own-property@esm/index.mjs";export{default as anyHasOwnProp}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-own-property@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";export{default as anyHasProp}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry@esm/index.mjs";export{default as anyIsEntry}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry-in@esm/index.mjs";export{default as anyIsEntryIn}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry-in@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"anyHasOwnProp",e),s(q,"anyHasProp",a),s(q,"anyIsEntry",t),s(q,"anyIsEntryIn",r),s(q,"contains",i),s(q,"hasEqualValues",d),s(q,"hasEqualValuesIndexed",n),s(q,"hasSameValues",m),s(q,"isAccessorArray",l),s(q,"isBooleanDataType",p),s(q,"isBooleanArray",o),s(q,"isByteOrder",j),s(q,"isComplexFloatingPointDataType",y),s(q,"isComplexTypedArray",h),s(q,"isComplex64Array",b),s(q,"isComplex128Array",x),s(q,"isDataType",v),s(q,"isFloatingPointDataType",f),s(q,"isIntegerDataType",g),s(q,"isMostlySafeDataTypeCast",c),s(q,"isNumericDataType",u),s(q,"isRealDataType",T),s(q,"isRealFloatingPointDataType",D),s(q,"isSafeDataTypeCast",A),s(q,"isSameKindDataTypeCast",C),s(q,"isSignedIntegerDataType",I),s(q,"isSortedAscending",S),s(q,"isUnsignedIntegerDataType",P);export{q as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 0075b74..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name anyHasOwnProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-own-property}\n*/\nimport anyHasOwnProp from '@stdlib/array-base-assert-any-has-own-property';\nsetReadOnly( ns, 'anyHasOwnProp', anyHasOwnProp );\n\n/**\n* @name anyHasProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-property}\n*/\nimport anyHasProp from '@stdlib/array-base-assert-any-has-property';\nsetReadOnly( ns, 'anyHasProp', anyHasProp );\n\n/**\n* @name anyIsEntry\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-is-entry}\n*/\nimport anyIsEntry from '@stdlib/array-base-assert-any-is-entry';\nsetReadOnly( ns, 'anyIsEntry', anyIsEntry );\n\n/**\n* @name anyIsEntryIn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-is-entry-in}\n*/\nimport anyIsEntryIn from '@stdlib/array-base-assert-any-is-entry-in';\nsetReadOnly( ns, 'anyIsEntryIn', anyIsEntryIn );\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyHasOwnProp","anyHasProp","anyIsEntry","anyIsEntryIn","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;+6NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,aAAAG,GAUAF,EAAAD,EAAA,aAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,WAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,wBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,kBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,iBAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,iCAAAc,GAUAb,EAAAD,EAAA,sBAAAe,GAUAd,EAAAD,EAAA,mBAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,aAAAkB,GAUAjB,EAAAD,EAAA,0BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,2BAAAqB,GAUApB,EAAAD,EAAA,oBAAAsB,GAUArB,EAAAD,EAAA,iBAAAuB,GAUAtB,EAAAD,EAAA,8BAAAwB,GAUAvB,EAAAD,EAAA,qBAAAyB,GAUAxB,EAAAD,EAAA,yBAAA0B,GAUAzB,EAAAD,EAAA,0BAAA2B,GAUA1B,EAAAD,EAAA,oBAAA4B,GAUA3B,EAAAD,EAAA,4BAAA6B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 8e3a722..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From f58d33602e136956f3493af875fa207c408b81a9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 8 May 2025 07:49:51 +0000 Subject: [PATCH 144/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 433 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 107 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 294 -- package.json | 125 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4901 insertions(+), 4452 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -215,7 +212,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -280,61 +277,61 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/any-has-own-property]: https://github.com/stdlib-js/array-base-assert-any-has-own-property +[@stdlib/array/base/assert/any-has-own-property]: https://github.com/stdlib-js/array-base-assert-any-has-own-property/tree/esm -[@stdlib/array/base/assert/any-has-property]: https://github.com/stdlib-js/array-base-assert-any-has-property +[@stdlib/array/base/assert/any-has-property]: https://github.com/stdlib-js/array-base-assert-any-has-property/tree/esm -[@stdlib/array/base/assert/any-is-entry-in]: https://github.com/stdlib-js/array-base-assert-any-is-entry-in +[@stdlib/array/base/assert/any-is-entry-in]: https://github.com/stdlib-js/array-base-assert-any-is-entry-in/tree/esm -[@stdlib/array/base/assert/any-is-entry]: https://github.com/stdlib-js/array-base-assert-any-is-entry +[@stdlib/array/base/assert/any-is-entry]: https://github.com/stdlib-js/array-base-assert-any-is-entry/tree/esm -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 1d32a7d..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"anyHasOwnProp",require('@stdlib/array-base-assert-any-has-own-property/dist'));r(e,"anyHasProp",require('@stdlib/array-base-assert-any-has-property/dist'));r(e,"anyIsEntry",require('@stdlib/array-base-assert-any-is-entry/dist'));r(e,"anyIsEntryIn",require('@stdlib/array-base-assert-any-is-entry-in/dist'));r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 5529b44..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name anyHasOwnProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-own-property}\n*/\nsetReadOnly( ns, 'anyHasOwnProp', require( '@stdlib/array-base-assert-any-has-own-property' ) );\n\n/**\n* @name anyHasProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-property}\n*/\nsetReadOnly( ns, 'anyHasProp', require( '@stdlib/array-base-assert-any-has-property' ) );\n\n/**\n* @name anyIsEntry\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-is-entry}\n*/\nsetReadOnly( ns, 'anyIsEntry', require( '@stdlib/array-base-assert-any-is-entry' ) );\n\n/**\n* @name anyIsEntryIn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-is-entry-in}\n*/\nsetReadOnly( ns, 'anyIsEntryIn', require( '@stdlib/array-base-assert-any-is-entry-in' ) );\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,gDAAiD,CAAE,EAS9FD,EAAaC,EAAI,aAAc,QAAS,4CAA6C,CAAE,EASvFD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..2de6015 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-own-property@esm/index.mjs";export{default as anyHasOwnProp}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-own-property@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";export{default as anyHasProp}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry@esm/index.mjs";export{default as anyIsEntry}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry-in@esm/index.mjs";export{default as anyIsEntryIn}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry-in@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"anyHasOwnProp",e),s(q,"anyHasProp",a),s(q,"anyIsEntry",t),s(q,"anyIsEntryIn",r),s(q,"contains",i),s(q,"hasEqualValues",d),s(q,"hasEqualValuesIndexed",n),s(q,"hasSameValues",m),s(q,"isAccessorArray",l),s(q,"isBooleanDataType",p),s(q,"isBooleanArray",o),s(q,"isByteOrder",j),s(q,"isComplexFloatingPointDataType",y),s(q,"isComplexTypedArray",h),s(q,"isComplex64Array",b),s(q,"isComplex128Array",x),s(q,"isDataType",v),s(q,"isFloatingPointDataType",f),s(q,"isIntegerDataType",g),s(q,"isMostlySafeDataTypeCast",c),s(q,"isNumericDataType",u),s(q,"isRealDataType",T),s(q,"isRealFloatingPointDataType",D),s(q,"isSafeDataTypeCast",A),s(q,"isSameKindDataTypeCast",C),s(q,"isSignedIntegerDataType",I),s(q,"isSortedAscending",S),s(q,"isUnsignedIntegerDataType",P);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..0075b74 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name anyHasOwnProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-own-property}\n*/\nimport anyHasOwnProp from '@stdlib/array-base-assert-any-has-own-property';\nsetReadOnly( ns, 'anyHasOwnProp', anyHasOwnProp );\n\n/**\n* @name anyHasProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-property}\n*/\nimport anyHasProp from '@stdlib/array-base-assert-any-has-property';\nsetReadOnly( ns, 'anyHasProp', anyHasProp );\n\n/**\n* @name anyIsEntry\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-is-entry}\n*/\nimport anyIsEntry from '@stdlib/array-base-assert-any-is-entry';\nsetReadOnly( ns, 'anyIsEntry', anyIsEntry );\n\n/**\n* @name anyIsEntryIn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-is-entry-in}\n*/\nimport anyIsEntryIn from '@stdlib/array-base-assert-any-is-entry-in';\nsetReadOnly( ns, 'anyIsEntryIn', anyIsEntryIn );\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyHasOwnProp","anyHasProp","anyIsEntry","anyIsEntryIn","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;+6NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,aAAAG,GAUAF,EAAAD,EAAA,aAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,WAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,wBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,kBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,iBAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,iCAAAc,GAUAb,EAAAD,EAAA,sBAAAe,GAUAd,EAAAD,EAAA,mBAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,aAAAkB,GAUAjB,EAAAD,EAAA,0BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,2BAAAqB,GAUApB,EAAAD,EAAA,oBAAAsB,GAUArB,EAAAD,EAAA,iBAAAuB,GAUAtB,EAAAD,EAAA,8BAAAwB,GAUAvB,EAAAD,EAAA,qBAAAyB,GAUAxB,EAAAD,EAAA,yBAAA0B,GAUAzB,EAAAD,EAAA,0BAAA2B,GAUA1B,EAAAD,EAAA,oBAAA4B,GAUA3B,EAAAD,EAAA,4BAAA6B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index b3a7235..0000000 --- a/lib/index.js +++ /dev/null @@ -1,294 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name anyHasOwnProp -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/any-has-own-property} -*/ -setReadOnly( ns, 'anyHasOwnProp', require( '@stdlib/array-base-assert-any-has-own-property' ) ); - -/** -* @name anyHasProp -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/any-has-property} -*/ -setReadOnly( ns, 'anyHasProp', require( '@stdlib/array-base-assert-any-has-property' ) ); - -/** -* @name anyIsEntry -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/any-is-entry} -*/ -setReadOnly( ns, 'anyIsEntry', require( '@stdlib/array-base-assert-any-is-entry' ) ); - -/** -* @name anyIsEntryIn -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/any-is-entry-in} -*/ -setReadOnly( ns, 'anyIsEntryIn', require( '@stdlib/array-base-assert-any-is-entry-in' ) ); - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index f9642f0..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,105 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-any-has-own-property": "github:stdlib-js/array-base-assert-any-has-own-property#main", - "@stdlib/array-base-assert-any-has-property": "github:stdlib-js/array-base-assert-any-has-property#main", - "@stdlib/array-base-assert-any-is-entry": "github:stdlib-js/array-base-assert-any-is-entry#main", - "@stdlib/array-base-assert-any-is-entry-in": "github:stdlib-js/array-base-assert-any-is-entry-in#main", - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "github:stdlib-js/array-base-assert-is-sorted-ascending#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-resolve-getter": "^0.2.2", - "@stdlib/array-base-to-accessor-array": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-filled": "^0.2.1", - "@stdlib/array-filled-by": "^0.2.1", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-has-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/string-from-code-point": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..8e3a722 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 37ec5c1bac5e078706615cc11692467a8147f9b7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 20 May 2025 13:02:09 +0000 Subject: [PATCH 145/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9b1cbf..f9642f0 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/string-from-code-point": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", From e0d0efe24a6ac6c4d76473c5c637fd27b41c39d3 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 20 May 2025 13:02:33 +0000 Subject: [PATCH 146/208] Remove files --- index.d.ts | 776 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5623 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 20bcb67..0000000 --- a/index.d.ts +++ /dev/null @@ -1,776 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 2de6015..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-own-property@esm/index.mjs";export{default as anyHasOwnProp}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-own-property@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";export{default as anyHasProp}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry@esm/index.mjs";export{default as anyIsEntry}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry-in@esm/index.mjs";export{default as anyIsEntryIn}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry-in@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"anyHasOwnProp",e),s(q,"anyHasProp",a),s(q,"anyIsEntry",t),s(q,"anyIsEntryIn",r),s(q,"contains",i),s(q,"hasEqualValues",d),s(q,"hasEqualValuesIndexed",n),s(q,"hasSameValues",m),s(q,"isAccessorArray",l),s(q,"isBooleanDataType",p),s(q,"isBooleanArray",o),s(q,"isByteOrder",j),s(q,"isComplexFloatingPointDataType",y),s(q,"isComplexTypedArray",h),s(q,"isComplex64Array",b),s(q,"isComplex128Array",x),s(q,"isDataType",v),s(q,"isFloatingPointDataType",f),s(q,"isIntegerDataType",g),s(q,"isMostlySafeDataTypeCast",c),s(q,"isNumericDataType",u),s(q,"isRealDataType",T),s(q,"isRealFloatingPointDataType",D),s(q,"isSafeDataTypeCast",A),s(q,"isSameKindDataTypeCast",C),s(q,"isSignedIntegerDataType",I),s(q,"isSortedAscending",S),s(q,"isUnsignedIntegerDataType",P);export{q as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 0075b74..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name anyHasOwnProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-own-property}\n*/\nimport anyHasOwnProp from '@stdlib/array-base-assert-any-has-own-property';\nsetReadOnly( ns, 'anyHasOwnProp', anyHasOwnProp );\n\n/**\n* @name anyHasProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-property}\n*/\nimport anyHasProp from '@stdlib/array-base-assert-any-has-property';\nsetReadOnly( ns, 'anyHasProp', anyHasProp );\n\n/**\n* @name anyIsEntry\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-is-entry}\n*/\nimport anyIsEntry from '@stdlib/array-base-assert-any-is-entry';\nsetReadOnly( ns, 'anyIsEntry', anyIsEntry );\n\n/**\n* @name anyIsEntryIn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-is-entry-in}\n*/\nimport anyIsEntryIn from '@stdlib/array-base-assert-any-is-entry-in';\nsetReadOnly( ns, 'anyIsEntryIn', anyIsEntryIn );\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyHasOwnProp","anyHasProp","anyIsEntry","anyIsEntryIn","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;+6NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,aAAAG,GAUAF,EAAAD,EAAA,aAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,WAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,wBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,kBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,iBAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,iCAAAc,GAUAb,EAAAD,EAAA,sBAAAe,GAUAd,EAAAD,EAAA,mBAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,aAAAkB,GAUAjB,EAAAD,EAAA,0BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,2BAAAqB,GAUApB,EAAAD,EAAA,oBAAAsB,GAUArB,EAAAD,EAAA,iBAAAuB,GAUAtB,EAAAD,EAAA,8BAAAwB,GAUAvB,EAAAD,EAAA,qBAAAyB,GAUAxB,EAAAD,EAAA,yBAAA0B,GAUAzB,EAAAD,EAAA,0BAAA2B,GAUA1B,EAAAD,EAAA,oBAAA4B,GAUA3B,EAAAD,EAAA,4BAAA6B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 8e3a722..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 561f43ff60d2feb66e8d70f0a3971a7eb7b2ede6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 20 May 2025 13:03:29 +0000 Subject: [PATCH 147/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 449 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 107 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 294 -- package.json | 125 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4901 insertions(+), 4468 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -215,7 +212,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -280,61 +277,61 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/any-has-own-property]: https://github.com/stdlib-js/array-base-assert-any-has-own-property +[@stdlib/array/base/assert/any-has-own-property]: https://github.com/stdlib-js/array-base-assert-any-has-own-property/tree/esm -[@stdlib/array/base/assert/any-has-property]: https://github.com/stdlib-js/array-base-assert-any-has-property +[@stdlib/array/base/assert/any-has-property]: https://github.com/stdlib-js/array-base-assert-any-has-property/tree/esm -[@stdlib/array/base/assert/any-is-entry-in]: https://github.com/stdlib-js/array-base-assert-any-is-entry-in +[@stdlib/array/base/assert/any-is-entry-in]: https://github.com/stdlib-js/array-base-assert-any-is-entry-in/tree/esm -[@stdlib/array/base/assert/any-is-entry]: https://github.com/stdlib-js/array-base-assert-any-is-entry +[@stdlib/array/base/assert/any-is-entry]: https://github.com/stdlib-js/array-base-assert-any-is-entry/tree/esm -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 1d32a7d..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"anyHasOwnProp",require('@stdlib/array-base-assert-any-has-own-property/dist'));r(e,"anyHasProp",require('@stdlib/array-base-assert-any-has-property/dist'));r(e,"anyIsEntry",require('@stdlib/array-base-assert-any-is-entry/dist'));r(e,"anyIsEntryIn",require('@stdlib/array-base-assert-any-is-entry-in/dist'));r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 5529b44..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name anyHasOwnProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-own-property}\n*/\nsetReadOnly( ns, 'anyHasOwnProp', require( '@stdlib/array-base-assert-any-has-own-property' ) );\n\n/**\n* @name anyHasProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-property}\n*/\nsetReadOnly( ns, 'anyHasProp', require( '@stdlib/array-base-assert-any-has-property' ) );\n\n/**\n* @name anyIsEntry\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-is-entry}\n*/\nsetReadOnly( ns, 'anyIsEntry', require( '@stdlib/array-base-assert-any-is-entry' ) );\n\n/**\n* @name anyIsEntryIn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-is-entry-in}\n*/\nsetReadOnly( ns, 'anyIsEntryIn', require( '@stdlib/array-base-assert-any-is-entry-in' ) );\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,gDAAiD,CAAE,EAS9FD,EAAaC,EAAI,aAAc,QAAS,4CAA6C,CAAE,EASvFD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..2de6015 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-own-property@esm/index.mjs";export{default as anyHasOwnProp}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-own-property@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";export{default as anyHasProp}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry@esm/index.mjs";export{default as anyIsEntry}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry-in@esm/index.mjs";export{default as anyIsEntryIn}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry-in@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"anyHasOwnProp",e),s(q,"anyHasProp",a),s(q,"anyIsEntry",t),s(q,"anyIsEntryIn",r),s(q,"contains",i),s(q,"hasEqualValues",d),s(q,"hasEqualValuesIndexed",n),s(q,"hasSameValues",m),s(q,"isAccessorArray",l),s(q,"isBooleanDataType",p),s(q,"isBooleanArray",o),s(q,"isByteOrder",j),s(q,"isComplexFloatingPointDataType",y),s(q,"isComplexTypedArray",h),s(q,"isComplex64Array",b),s(q,"isComplex128Array",x),s(q,"isDataType",v),s(q,"isFloatingPointDataType",f),s(q,"isIntegerDataType",g),s(q,"isMostlySafeDataTypeCast",c),s(q,"isNumericDataType",u),s(q,"isRealDataType",T),s(q,"isRealFloatingPointDataType",D),s(q,"isSafeDataTypeCast",A),s(q,"isSameKindDataTypeCast",C),s(q,"isSignedIntegerDataType",I),s(q,"isSortedAscending",S),s(q,"isUnsignedIntegerDataType",P);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..0075b74 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name anyHasOwnProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-own-property}\n*/\nimport anyHasOwnProp from '@stdlib/array-base-assert-any-has-own-property';\nsetReadOnly( ns, 'anyHasOwnProp', anyHasOwnProp );\n\n/**\n* @name anyHasProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-property}\n*/\nimport anyHasProp from '@stdlib/array-base-assert-any-has-property';\nsetReadOnly( ns, 'anyHasProp', anyHasProp );\n\n/**\n* @name anyIsEntry\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-is-entry}\n*/\nimport anyIsEntry from '@stdlib/array-base-assert-any-is-entry';\nsetReadOnly( ns, 'anyIsEntry', anyIsEntry );\n\n/**\n* @name anyIsEntryIn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-is-entry-in}\n*/\nimport anyIsEntryIn from '@stdlib/array-base-assert-any-is-entry-in';\nsetReadOnly( ns, 'anyIsEntryIn', anyIsEntryIn );\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyHasOwnProp","anyHasProp","anyIsEntry","anyIsEntryIn","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;+6NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,aAAAG,GAUAF,EAAAD,EAAA,aAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,WAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,wBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,kBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,iBAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,iCAAAc,GAUAb,EAAAD,EAAA,sBAAAe,GAUAd,EAAAD,EAAA,mBAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,aAAAkB,GAUAjB,EAAAD,EAAA,0BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,2BAAAqB,GAUApB,EAAAD,EAAA,oBAAAsB,GAUArB,EAAAD,EAAA,iBAAAuB,GAUAtB,EAAAD,EAAA,8BAAAwB,GAUAvB,EAAAD,EAAA,qBAAAyB,GAUAxB,EAAAD,EAAA,yBAAA0B,GAUAzB,EAAAD,EAAA,0BAAA2B,GAUA1B,EAAAD,EAAA,oBAAA4B,GAUA3B,EAAAD,EAAA,4BAAA6B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index b3a7235..0000000 --- a/lib/index.js +++ /dev/null @@ -1,294 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name anyHasOwnProp -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/any-has-own-property} -*/ -setReadOnly( ns, 'anyHasOwnProp', require( '@stdlib/array-base-assert-any-has-own-property' ) ); - -/** -* @name anyHasProp -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/any-has-property} -*/ -setReadOnly( ns, 'anyHasProp', require( '@stdlib/array-base-assert-any-has-property' ) ); - -/** -* @name anyIsEntry -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/any-is-entry} -*/ -setReadOnly( ns, 'anyIsEntry', require( '@stdlib/array-base-assert-any-is-entry' ) ); - -/** -* @name anyIsEntryIn -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/any-is-entry-in} -*/ -setReadOnly( ns, 'anyIsEntryIn', require( '@stdlib/array-base-assert-any-is-entry-in' ) ); - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index f9642f0..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,105 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-any-has-own-property": "github:stdlib-js/array-base-assert-any-has-own-property#main", - "@stdlib/array-base-assert-any-has-property": "github:stdlib-js/array-base-assert-any-has-property#main", - "@stdlib/array-base-assert-any-is-entry": "github:stdlib-js/array-base-assert-any-is-entry#main", - "@stdlib/array-base-assert-any-is-entry-in": "github:stdlib-js/array-base-assert-any-is-entry-in#main", - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "github:stdlib-js/array-base-assert-is-sorted-ascending#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-resolve-getter": "^0.2.2", - "@stdlib/array-base-to-accessor-array": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-filled": "^0.2.1", - "@stdlib/array-filled-by": "^0.2.1", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-has-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/string-from-code-point": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..8e3a722 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 1c517c9eb334cec80ca23143a3bbc77745e399ff Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 21 May 2025 08:52:30 +0000 Subject: [PATCH 148/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d194c33..748e3f4 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 2435397f8de4e9f1ba1d362ee7f089ce6b101238 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 21 May 2025 08:52:51 +0000 Subject: [PATCH 149/208] Remove files --- index.d.ts | 776 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5623 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 20bcb67..0000000 --- a/index.d.ts +++ /dev/null @@ -1,776 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 2de6015..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-own-property@esm/index.mjs";export{default as anyHasOwnProp}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-own-property@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";export{default as anyHasProp}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-has-property@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry@esm/index.mjs";export{default as anyIsEntry}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry-in@esm/index.mjs";export{default as anyIsEntryIn}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-any-is-entry-in@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"anyHasOwnProp",e),s(q,"anyHasProp",a),s(q,"anyIsEntry",t),s(q,"anyIsEntryIn",r),s(q,"contains",i),s(q,"hasEqualValues",d),s(q,"hasEqualValuesIndexed",n),s(q,"hasSameValues",m),s(q,"isAccessorArray",l),s(q,"isBooleanDataType",p),s(q,"isBooleanArray",o),s(q,"isByteOrder",j),s(q,"isComplexFloatingPointDataType",y),s(q,"isComplexTypedArray",h),s(q,"isComplex64Array",b),s(q,"isComplex128Array",x),s(q,"isDataType",v),s(q,"isFloatingPointDataType",f),s(q,"isIntegerDataType",g),s(q,"isMostlySafeDataTypeCast",c),s(q,"isNumericDataType",u),s(q,"isRealDataType",T),s(q,"isRealFloatingPointDataType",D),s(q,"isSafeDataTypeCast",A),s(q,"isSameKindDataTypeCast",C),s(q,"isSignedIntegerDataType",I),s(q,"isSortedAscending",S),s(q,"isUnsignedIntegerDataType",P);export{q as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 0075b74..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name anyHasOwnProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-own-property}\n*/\nimport anyHasOwnProp from '@stdlib/array-base-assert-any-has-own-property';\nsetReadOnly( ns, 'anyHasOwnProp', anyHasOwnProp );\n\n/**\n* @name anyHasProp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-has-property}\n*/\nimport anyHasProp from '@stdlib/array-base-assert-any-has-property';\nsetReadOnly( ns, 'anyHasProp', anyHasProp );\n\n/**\n* @name anyIsEntry\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-is-entry}\n*/\nimport anyIsEntry from '@stdlib/array-base-assert-any-is-entry';\nsetReadOnly( ns, 'anyIsEntry', anyIsEntry );\n\n/**\n* @name anyIsEntryIn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/any-is-entry-in}\n*/\nimport anyIsEntryIn from '@stdlib/array-base-assert-any-is-entry-in';\nsetReadOnly( ns, 'anyIsEntryIn', anyIsEntryIn );\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyHasOwnProp","anyHasProp","anyIsEntry","anyIsEntryIn","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;+6NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,aAAAG,GAUAF,EAAAD,EAAA,aAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,WAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,wBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,kBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,iBAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,iCAAAc,GAUAb,EAAAD,EAAA,sBAAAe,GAUAd,EAAAD,EAAA,mBAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,aAAAkB,GAUAjB,EAAAD,EAAA,0BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,2BAAAqB,GAUApB,EAAAD,EAAA,oBAAAsB,GAUArB,EAAAD,EAAA,iBAAAuB,GAUAtB,EAAAD,EAAA,8BAAAwB,GAUAvB,EAAAD,EAAA,qBAAAyB,GAUAxB,EAAAD,EAAA,yBAAA0B,GAUAzB,EAAAD,EAAA,0BAAA2B,GAUA1B,EAAAD,EAAA,oBAAA4B,GAUA3B,EAAAD,EAAA,4BAAA6B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 8e3a722..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From c15f306cf67de3fc37fba65e0a2a6b66f981970e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 21 May 2025 08:53:37 +0000 Subject: [PATCH 150/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 483 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 107 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 258 - package.json | 114 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4901 insertions(+), 4455 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -215,7 +212,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -280,61 +277,61 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/any-has-own-property]: https://github.com/stdlib-js/array-base-assert-any-has-own-property +[@stdlib/array/base/assert/any-has-own-property]: https://github.com/stdlib-js/array-base-assert-any-has-own-property/tree/esm -[@stdlib/array/base/assert/any-has-property]: https://github.com/stdlib-js/array-base-assert-any-has-property +[@stdlib/array/base/assert/any-has-property]: https://github.com/stdlib-js/array-base-assert-any-has-property/tree/esm -[@stdlib/array/base/assert/any-is-entry-in]: https://github.com/stdlib-js/array-base-assert-any-is-entry-in +[@stdlib/array/base/assert/any-is-entry-in]: https://github.com/stdlib-js/array-base-assert-any-is-entry-in/tree/esm -[@stdlib/array/base/assert/any-is-entry]: https://github.com/stdlib-js/array-base-assert-any-is-entry +[@stdlib/array/base/assert/any-is-entry]: https://github.com/stdlib-js/array-base-assert-any-is-entry/tree/esm -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 9a03329..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index c91eeb4..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..da1f1e7 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var C={};s(C,"contains",e),s(C,"hasEqualValues",a),s(C,"hasEqualValuesIndexed",t),s(C,"hasSameValues",r),s(C,"isAccessorArray",i),s(C,"isBooleanDataType",d),s(C,"isBooleanArray",n),s(C,"isByteOrder",m),s(C,"isComplexFloatingPointDataType",l),s(C,"isComplexTypedArray",p),s(C,"isComplex64Array",o),s(C,"isComplex128Array",j),s(C,"isDataType",y),s(C,"isFloatingPointDataType",h),s(C,"isIntegerDataType",b),s(C,"isMostlySafeDataTypeCast",v),s(C,"isNumericDataType",x),s(C,"isRealDataType",f),s(C,"isRealFloatingPointDataType",g),s(C,"isSafeDataTypeCast",c),s(C,"isSameKindDataTypeCast",u),s(C,"isSignedIntegerDataType",T),s(C,"isSortedAscending",D),s(C,"isUnsignedIntegerDataType",A);export{C as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..02e1539 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;4iMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,cAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,iBAAAmB,GAUAlB,EAAAD,EAAA,8BAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,oBAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 591dc6a..0000000 --- a/lib/index.js +++ /dev/null @@ -1,258 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 748e3f4..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,94 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "github:stdlib-js/array-base-assert-is-sorted-ascending#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..de82ae0 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From b3a9b077427e1308282224e97dc329eed52ba08b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 22 May 2025 03:44:17 +0000 Subject: [PATCH 151/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d194c33..748e3f4 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From e37d3b3841d9fc9a6d990f89dd7df04f0102c77c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 22 May 2025 03:44:34 +0000 Subject: [PATCH 152/208] Remove files --- index.d.ts | 776 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5623 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 20bcb67..0000000 --- a/index.d.ts +++ /dev/null @@ -1,776 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index da1f1e7..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var C={};s(C,"contains",e),s(C,"hasEqualValues",a),s(C,"hasEqualValuesIndexed",t),s(C,"hasSameValues",r),s(C,"isAccessorArray",i),s(C,"isBooleanDataType",d),s(C,"isBooleanArray",n),s(C,"isByteOrder",m),s(C,"isComplexFloatingPointDataType",l),s(C,"isComplexTypedArray",p),s(C,"isComplex64Array",o),s(C,"isComplex128Array",j),s(C,"isDataType",y),s(C,"isFloatingPointDataType",h),s(C,"isIntegerDataType",b),s(C,"isMostlySafeDataTypeCast",v),s(C,"isNumericDataType",x),s(C,"isRealDataType",f),s(C,"isRealFloatingPointDataType",g),s(C,"isSafeDataTypeCast",c),s(C,"isSameKindDataTypeCast",u),s(C,"isSignedIntegerDataType",T),s(C,"isSortedAscending",D),s(C,"isUnsignedIntegerDataType",A);export{C as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 02e1539..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;4iMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,cAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,iBAAAmB,GAUAlB,EAAAD,EAAA,8BAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,oBAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index de82ae0..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 58503ce7c73db5bf2694fc390e3a7b951c8d72e9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 22 May 2025 03:45:09 +0000 Subject: [PATCH 153/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 484 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 99 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 258 - package.json | 114 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4897 insertions(+), 4452 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -211,7 +208,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -276,53 +273,53 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 9a03329..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index c91eeb4..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..da1f1e7 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var C={};s(C,"contains",e),s(C,"hasEqualValues",a),s(C,"hasEqualValuesIndexed",t),s(C,"hasSameValues",r),s(C,"isAccessorArray",i),s(C,"isBooleanDataType",d),s(C,"isBooleanArray",n),s(C,"isByteOrder",m),s(C,"isComplexFloatingPointDataType",l),s(C,"isComplexTypedArray",p),s(C,"isComplex64Array",o),s(C,"isComplex128Array",j),s(C,"isDataType",y),s(C,"isFloatingPointDataType",h),s(C,"isIntegerDataType",b),s(C,"isMostlySafeDataTypeCast",v),s(C,"isNumericDataType",x),s(C,"isRealDataType",f),s(C,"isRealFloatingPointDataType",g),s(C,"isSafeDataTypeCast",c),s(C,"isSameKindDataTypeCast",u),s(C,"isSignedIntegerDataType",T),s(C,"isSortedAscending",D),s(C,"isUnsignedIntegerDataType",A);export{C as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..02e1539 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;4iMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,cAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,iBAAAmB,GAUAlB,EAAAD,EAAA,8BAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,oBAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 591dc6a..0000000 --- a/lib/index.js +++ /dev/null @@ -1,258 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 748e3f4..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,94 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "github:stdlib-js/array-base-assert-is-sorted-ascending#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..de82ae0 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 018344e4553bb28644cba81aa4ac8dde8f96b342 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 15 Jul 2025 06:04:58 +0000 Subject: [PATCH 154/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6b7e038..3288eb5 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 1e87abc4af80d00d33c6298d4eecfd20c17423cf Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 15 Jul 2025 06:05:16 +0000 Subject: [PATCH 155/208] Remove files --- index.d.ts | 776 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5623 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 20bcb67..0000000 --- a/index.d.ts +++ /dev/null @@ -1,776 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index da1f1e7..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var C={};s(C,"contains",e),s(C,"hasEqualValues",a),s(C,"hasEqualValuesIndexed",t),s(C,"hasSameValues",r),s(C,"isAccessorArray",i),s(C,"isBooleanDataType",d),s(C,"isBooleanArray",n),s(C,"isByteOrder",m),s(C,"isComplexFloatingPointDataType",l),s(C,"isComplexTypedArray",p),s(C,"isComplex64Array",o),s(C,"isComplex128Array",j),s(C,"isDataType",y),s(C,"isFloatingPointDataType",h),s(C,"isIntegerDataType",b),s(C,"isMostlySafeDataTypeCast",v),s(C,"isNumericDataType",x),s(C,"isRealDataType",f),s(C,"isRealFloatingPointDataType",g),s(C,"isSafeDataTypeCast",c),s(C,"isSameKindDataTypeCast",u),s(C,"isSignedIntegerDataType",T),s(C,"isSortedAscending",D),s(C,"isUnsignedIntegerDataType",A);export{C as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 02e1539..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;4iMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,iBAAAG,GAUAF,EAAAD,EAAA,wBAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,kBAAAM,GAUAL,EAAAD,EAAA,oBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,cAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,mBAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,iBAAAmB,GAUAlB,EAAAD,EAAA,8BAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,oBAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index de82ae0..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 9bd205e132ec04512d7775fd307c7b05cf9a980a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 15 Jul 2025 06:05:57 +0000 Subject: [PATCH 156/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 488 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 99 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 - package.json | 121 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4897 insertions(+), 4472 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -211,7 +208,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -276,53 +273,53 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 253dc04..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasAlmostEqualValues",require('@stdlib/array-base-assert-has-almost-equal-values/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index fe65483..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nsetReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,uBAAwB,QAAS,mDAAoD,CAAE,EASxGD,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..bf871af --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasEqualValues",t),s(q,"hasEqualValuesIndexed",r),s(q,"hasSameValues",i),s(q,"isAccessorArray",d),s(q,"isBooleanDataType",n),s(q,"isBooleanArray",m),s(q,"isByteOrder",l),s(q,"isComplexFloatingPointDataType",o),s(q,"isComplexTypedArray",p),s(q,"isComplex64Array",j),s(q,"isComplex128Array",y),s(q,"isDataType",h),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",v),s(q,"isSafeDataTypeCast",u),s(q,"isSameKindDataTypeCast",T),s(q,"isSignedIntegerDataType",D),s(q,"isSortedAscending",A),s(q,"isUnsignedIntegerDataType",C);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..325b7a3 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;sqMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,iBAAAI,GAUAH,EAAAD,EAAA,wBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,kBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,iBAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,sBAAAY,GAUAX,EAAAD,EAAA,mBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,aAAAe,GAUAd,EAAAD,EAAA,0BAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,2BAAAkB,GAUAjB,EAAAD,EAAA,oBAAAmB,GAUAlB,EAAAD,EAAA,iBAAAoB,GAUAnB,EAAAD,EAAA,8BAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,oBAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 0c7a2e8..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasAlmostEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values} -*/ -setReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 3288eb5..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,101 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-almost-equal-values": "github:stdlib-js/array-base-assert-has-almost-equal-values#main", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "github:stdlib-js/array-base-assert-is-sorted-ascending#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-almost-equal": "github:stdlib-js/assert-is-almost-equal#main", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/constants-float32-eps": "^0.2.2", - "@stdlib/constants-float64-eps": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/number-float32-base-assert-is-almost-equal": "github:stdlib-js/number-float32-base-assert-is-almost-equal#main", - "@stdlib/number-float64-base-assert-is-almost-equal": "github:stdlib-js/number-float64-base-assert-is-almost-equal#main", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/random-array-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..d0f8369 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From c4a88466a31c21e0913acdee084b9efb6b03c57a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 11 Aug 2025 01:01:51 +0000 Subject: [PATCH 157/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6b7e038..3288eb5 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 41bd2f9907c0cf3e7db9185064255715c9ccf40a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 11 Aug 2025 01:09:10 +0000 Subject: [PATCH 158/208] Remove files --- index.d.ts | 776 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5623 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 20bcb67..0000000 --- a/index.d.ts +++ /dev/null @@ -1,776 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index bf871af..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasEqualValues",t),s(q,"hasEqualValuesIndexed",r),s(q,"hasSameValues",i),s(q,"isAccessorArray",d),s(q,"isBooleanDataType",n),s(q,"isBooleanArray",m),s(q,"isByteOrder",l),s(q,"isComplexFloatingPointDataType",o),s(q,"isComplexTypedArray",p),s(q,"isComplex64Array",j),s(q,"isComplex128Array",y),s(q,"isDataType",h),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",v),s(q,"isSafeDataTypeCast",u),s(q,"isSameKindDataTypeCast",T),s(q,"isSignedIntegerDataType",D),s(q,"isSortedAscending",A),s(q,"isUnsignedIntegerDataType",C);export{q as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 325b7a3..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;sqMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,iBAAAI,GAUAH,EAAAD,EAAA,wBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,kBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,iBAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,sBAAAY,GAUAX,EAAAD,EAAA,mBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,aAAAe,GAUAd,EAAAD,EAAA,0BAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,2BAAAkB,GAUAjB,EAAAD,EAAA,oBAAAmB,GAUAlB,EAAAD,EAAA,iBAAAoB,GAUAnB,EAAAD,EAAA,8BAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,oBAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index d0f8369..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From d86089784abec25488d28c2aa0c8d5d92d399e13 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 11 Aug 2025 01:09:59 +0000 Subject: [PATCH 159/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 489 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 99 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 - package.json | 121 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 41 files changed, 4897 insertions(+), 4474 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index eadb8cf..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2025-08-11T00:59:13.247Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -211,7 +208,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -276,53 +273,53 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 253dc04..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasAlmostEqualValues",require('@stdlib/array-base-assert-has-almost-equal-values/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index fe65483..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nsetReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,uBAAwB,QAAS,mDAAoD,CAAE,EASxGD,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..7e6ee26 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasEqualValues",t),s(q,"hasEqualValuesIndexed",r),s(q,"hasSameValues",i),s(q,"isAccessorArray",d),s(q,"isBooleanDataType",n),s(q,"isBooleanArray",m),s(q,"isByteOrder",l),s(q,"isComplexFloatingPointDataType",o),s(q,"isComplexTypedArray",p),s(q,"isComplex64Array",j),s(q,"isComplex128Array",y),s(q,"isDataType",h),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",v),s(q,"isMostlySafeDataTypeCast",x),s(q,"isNumericDataType",f),s(q,"isRealDataType",g),s(q,"isRealFloatingPointDataType",c),s(q,"isSafeDataTypeCast",u),s(q,"isSameKindDataTypeCast",T),s(q,"isSignedIntegerDataType",D),s(q,"isSortedAscending",A),s(q,"isUnsignedIntegerDataType",C);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..ef4f2ed --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;oyMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,iBAAAI,GAUAH,EAAAD,EAAA,wBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,kBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,iBAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,sBAAAY,GAUAX,EAAAD,EAAA,mBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,aAAAe,GAUAd,EAAAD,EAAA,0BAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,2BAAAkB,GAUAjB,EAAAD,EAAA,oBAAAmB,GAUAlB,EAAAD,EAAA,iBAAAoB,GAUAnB,EAAAD,EAAA,8BAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,oBAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 0c7a2e8..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasAlmostEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values} -*/ -setReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 3288eb5..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,101 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-almost-equal-values": "github:stdlib-js/array-base-assert-has-almost-equal-values#main", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "github:stdlib-js/array-base-assert-is-sorted-ascending#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-almost-equal": "github:stdlib-js/assert-is-almost-equal#main", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/constants-float32-eps": "^0.2.2", - "@stdlib/constants-float64-eps": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/number-float32-base-assert-is-almost-equal": "github:stdlib-js/number-float32-base-assert-is-almost-equal#main", - "@stdlib/number-float64-base-assert-is-almost-equal": "github:stdlib-js/number-float64-base-assert-is-almost-equal#main", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/random-array-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..8b12a2f --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 69deb24..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From fa8d654427eb3155321a699d45684c5014a94941 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 21 Sep 2025 17:39:16 +0000 Subject: [PATCH 160/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6b7e038..3288eb5 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 0cff9c12ce3d7ad04fd3ec80c1b42ebb4fe2657c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 21 Sep 2025 17:39:33 +0000 Subject: [PATCH 161/208] Remove files --- index.d.ts | 776 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5623 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 20bcb67..0000000 --- a/index.d.ts +++ /dev/null @@ -1,776 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 7e6ee26..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasEqualValues",t),s(q,"hasEqualValuesIndexed",r),s(q,"hasSameValues",i),s(q,"isAccessorArray",d),s(q,"isBooleanDataType",n),s(q,"isBooleanArray",m),s(q,"isByteOrder",l),s(q,"isComplexFloatingPointDataType",o),s(q,"isComplexTypedArray",p),s(q,"isComplex64Array",j),s(q,"isComplex128Array",y),s(q,"isDataType",h),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",v),s(q,"isMostlySafeDataTypeCast",x),s(q,"isNumericDataType",f),s(q,"isRealDataType",g),s(q,"isRealFloatingPointDataType",c),s(q,"isSafeDataTypeCast",u),s(q,"isSameKindDataTypeCast",T),s(q,"isSignedIntegerDataType",D),s(q,"isSortedAscending",A),s(q,"isUnsignedIntegerDataType",C);export{q as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index ef4f2ed..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;oyMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,iBAAAI,GAUAH,EAAAD,EAAA,wBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,kBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,iBAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,sBAAAY,GAUAX,EAAAD,EAAA,mBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,aAAAe,GAUAd,EAAAD,EAAA,0BAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,2BAAAkB,GAUAjB,EAAAD,EAAA,oBAAAmB,GAUAlB,EAAAD,EAAA,iBAAAoB,GAUAnB,EAAAD,EAAA,8BAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,oBAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 8b12a2f..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 257b4fce47457069da3e2a12e57f3ece3b5be859 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 21 Sep 2025 17:40:37 +0000 Subject: [PATCH 162/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 199 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 493 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 99 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 - package.json | 121 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4897 insertions(+), 4482 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -211,7 +208,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -276,53 +273,53 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 253dc04..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasAlmostEqualValues",require('@stdlib/array-base-assert-has-almost-equal-values/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index fe65483..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nsetReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,uBAAwB,QAAS,mDAAoD,CAAE,EASxGD,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..7e6ee26 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasEqualValues",t),s(q,"hasEqualValuesIndexed",r),s(q,"hasSameValues",i),s(q,"isAccessorArray",d),s(q,"isBooleanDataType",n),s(q,"isBooleanArray",m),s(q,"isByteOrder",l),s(q,"isComplexFloatingPointDataType",o),s(q,"isComplexTypedArray",p),s(q,"isComplex64Array",j),s(q,"isComplex128Array",y),s(q,"isDataType",h),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",v),s(q,"isMostlySafeDataTypeCast",x),s(q,"isNumericDataType",f),s(q,"isRealDataType",g),s(q,"isRealFloatingPointDataType",c),s(q,"isSafeDataTypeCast",u),s(q,"isSameKindDataTypeCast",T),s(q,"isSignedIntegerDataType",D),s(q,"isSortedAscending",A),s(q,"isUnsignedIntegerDataType",C);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..ef4f2ed --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;oyMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,iBAAAI,GAUAH,EAAAD,EAAA,wBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,kBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,iBAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,sBAAAY,GAUAX,EAAAD,EAAA,mBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,aAAAe,GAUAd,EAAAD,EAAA,0BAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,2BAAAkB,GAUAjB,EAAAD,EAAA,oBAAAmB,GAUAlB,EAAAD,EAAA,iBAAAoB,GAUAnB,EAAAD,EAAA,8BAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,oBAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 0c7a2e8..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasAlmostEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values} -*/ -setReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 3288eb5..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,101 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-almost-equal-values": "github:stdlib-js/array-base-assert-has-almost-equal-values#main", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "github:stdlib-js/array-base-assert-is-sorted-ascending#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-almost-equal": "github:stdlib-js/assert-is-almost-equal#main", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/constants-float32-eps": "^0.2.2", - "@stdlib/constants-float64-eps": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/number-float32-base-assert-is-almost-equal": "github:stdlib-js/number-float32-base-assert-is-almost-equal#main", - "@stdlib/number-float64-base-assert-is-almost-equal": "github:stdlib-js/number-float64-base-assert-is-almost-equal#main", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/random-array-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..8b12a2f --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index fea45a5..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.strictEqual( keys.length > 0, true, 'has keys' ); - t.end(); -}); From b2222fcdabb2ff0e988721cb1d21d4be48ac55c3 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 7 Nov 2025 09:02:27 +0000 Subject: [PATCH 163/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6b7e038..3288eb5 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From ee5cc52a875c92146641014a9bff5c4e99edd5ed Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 7 Nov 2025 09:02:47 +0000 Subject: [PATCH 164/208] Remove files --- index.d.ts | 798 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5645 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index efb2d70..0000000 --- a/index.d.ts +++ /dev/null @@ -1,798 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasAlmostEqualValues = require( '@stdlib/array-base-assert-has-almost-equal-values' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have respective elements which are approximately equal within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately equal - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostEqualValues( x, y, 0 ); - * // returns true - */ - hasAlmostEqualValues: typeof hasAlmostEqualValues; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 7e6ee26..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasEqualValues",t),s(q,"hasEqualValuesIndexed",r),s(q,"hasSameValues",i),s(q,"isAccessorArray",d),s(q,"isBooleanDataType",n),s(q,"isBooleanArray",m),s(q,"isByteOrder",l),s(q,"isComplexFloatingPointDataType",o),s(q,"isComplexTypedArray",p),s(q,"isComplex64Array",j),s(q,"isComplex128Array",y),s(q,"isDataType",h),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",v),s(q,"isMostlySafeDataTypeCast",x),s(q,"isNumericDataType",f),s(q,"isRealDataType",g),s(q,"isRealFloatingPointDataType",c),s(q,"isSafeDataTypeCast",u),s(q,"isSameKindDataTypeCast",T),s(q,"isSignedIntegerDataType",D),s(q,"isSortedAscending",A),s(q,"isUnsignedIntegerDataType",C);export{q as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index ef4f2ed..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;oyMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,iBAAAI,GAUAH,EAAAD,EAAA,wBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,kBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,iBAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,sBAAAY,GAUAX,EAAAD,EAAA,mBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,aAAAe,GAUAd,EAAAD,EAAA,0BAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,2BAAAkB,GAUAjB,EAAAD,EAAA,oBAAAmB,GAUAlB,EAAAD,EAAA,iBAAAoB,GAUAnB,EAAAD,EAAA,8BAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,oBAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 8b12a2f..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 9cd0aede88c1acd6c65d8ec8c60644a0608c263f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 7 Nov 2025 09:03:58 +0000 Subject: [PATCH 165/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 199 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 494 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 101 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 - package.json | 121 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4898 insertions(+), 4484 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -212,7 +209,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -277,55 +274,55 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values +[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 253dc04..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasAlmostEqualValues",require('@stdlib/array-base-assert-has-almost-equal-values/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index fe65483..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nsetReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,uBAAwB,QAAS,mDAAoD,CAAE,EASxGD,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..7e6ee26 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasEqualValues",t),s(q,"hasEqualValuesIndexed",r),s(q,"hasSameValues",i),s(q,"isAccessorArray",d),s(q,"isBooleanDataType",n),s(q,"isBooleanArray",m),s(q,"isByteOrder",l),s(q,"isComplexFloatingPointDataType",o),s(q,"isComplexTypedArray",p),s(q,"isComplex64Array",j),s(q,"isComplex128Array",y),s(q,"isDataType",h),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",v),s(q,"isMostlySafeDataTypeCast",x),s(q,"isNumericDataType",f),s(q,"isRealDataType",g),s(q,"isRealFloatingPointDataType",c),s(q,"isSafeDataTypeCast",u),s(q,"isSameKindDataTypeCast",T),s(q,"isSignedIntegerDataType",D),s(q,"isSortedAscending",A),s(q,"isUnsignedIntegerDataType",C);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..ef4f2ed --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;oyMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,iBAAAI,GAUAH,EAAAD,EAAA,wBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,kBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,iBAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,sBAAAY,GAUAX,EAAAD,EAAA,mBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,aAAAe,GAUAd,EAAAD,EAAA,0BAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,2BAAAkB,GAUAjB,EAAAD,EAAA,oBAAAmB,GAUAlB,EAAAD,EAAA,iBAAAoB,GAUAnB,EAAAD,EAAA,8BAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,oBAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 0c7a2e8..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasAlmostEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values} -*/ -setReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 3288eb5..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,101 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-almost-equal-values": "github:stdlib-js/array-base-assert-has-almost-equal-values#main", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "github:stdlib-js/array-base-assert-is-sorted-ascending#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-almost-equal": "github:stdlib-js/assert-is-almost-equal#main", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/constants-float32-eps": "^0.2.2", - "@stdlib/constants-float64-eps": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/number-float32-base-assert-is-almost-equal": "github:stdlib-js/number-float32-base-assert-is-almost-equal#main", - "@stdlib/number-float64-base-assert-is-almost-equal": "github:stdlib-js/number-float64-base-assert-is-almost-equal#main", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/random-array-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..8b12a2f --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index fea45a5..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.strictEqual( keys.length > 0, true, 'has keys' ); - t.end(); -}); From f5408ae8029ba57319e9260523fe2e2a8a0da7f0 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 18 Dec 2025 02:24:24 +0000 Subject: [PATCH 166/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e863979..81ccb8b 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 0c25e7ac66db04916f69926e40422dc00f5e5db7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 18 Dec 2025 02:24:42 +0000 Subject: [PATCH 167/208] Remove files --- index.d.ts | 798 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5645 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index efb2d70..0000000 --- a/index.d.ts +++ /dev/null @@ -1,798 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasAlmostEqualValues = require( '@stdlib/array-base-assert-has-almost-equal-values' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have respective elements which are approximately equal within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately equal - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostEqualValues( x, y, 0 ); - * // returns true - */ - hasAlmostEqualValues: typeof hasAlmostEqualValues; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 7e6ee26..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasEqualValues",t),s(q,"hasEqualValuesIndexed",r),s(q,"hasSameValues",i),s(q,"isAccessorArray",d),s(q,"isBooleanDataType",n),s(q,"isBooleanArray",m),s(q,"isByteOrder",l),s(q,"isComplexFloatingPointDataType",o),s(q,"isComplexTypedArray",p),s(q,"isComplex64Array",j),s(q,"isComplex128Array",y),s(q,"isDataType",h),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",v),s(q,"isMostlySafeDataTypeCast",x),s(q,"isNumericDataType",f),s(q,"isRealDataType",g),s(q,"isRealFloatingPointDataType",c),s(q,"isSafeDataTypeCast",u),s(q,"isSameKindDataTypeCast",T),s(q,"isSignedIntegerDataType",D),s(q,"isSortedAscending",A),s(q,"isUnsignedIntegerDataType",C);export{q as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index ef4f2ed..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;oyMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,iBAAAI,GAUAH,EAAAD,EAAA,wBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,kBAAAO,GAUAN,EAAAD,EAAA,oBAAAQ,GAUAP,EAAAD,EAAA,iBAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,sBAAAY,GAUAX,EAAAD,EAAA,mBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,aAAAe,GAUAd,EAAAD,EAAA,0BAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,2BAAAkB,GAUAjB,EAAAD,EAAA,oBAAAmB,GAUAlB,EAAAD,EAAA,iBAAAoB,GAUAnB,EAAAD,EAAA,8BAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,oBAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 8b12a2f..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 2b5a208a1b0fc63597d4c2eeef97cd080a4f9a79 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 18 Dec 2025 02:25:33 +0000 Subject: [PATCH 168/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 199 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 508 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 101 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 276 - package.json | 125 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4898 insertions(+), 4511 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -212,7 +209,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -277,55 +274,55 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values +[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0143c67..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasAlmostEqualValues",require('@stdlib/array-base-assert-has-almost-equal-values/dist'));r(e,"hasAlmostSameValues",require('@stdlib/array-base-assert-has-almost-same-values/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 3c91d0d..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nsetReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nsetReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,uBAAwB,QAAS,mDAAoD,CAAE,EASxGD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..3d52c3c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",b),s(q,"isFloatingPointDataType",v),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e2091b4 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;yhNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index f9c2c4b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,276 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasAlmostEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values} -*/ -setReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) ); - -/** -* @name hasAlmostSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-same-values} -*/ -setReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 81ccb8b..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,105 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-almost-equal-values": "github:stdlib-js/array-base-assert-has-almost-equal-values#main", - "@stdlib/array-base-assert-has-almost-same-values": "github:stdlib-js/array-base-assert-has-almost-same-values#main", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "github:stdlib-js/array-base-assert-is-sorted-ascending#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-almost-equal": "github:stdlib-js/assert-is-almost-equal#main", - "@stdlib/assert-is-almost-same-value": "github:stdlib-js/assert-is-almost-same-value#main", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/constants-float32-eps": "^0.2.2", - "@stdlib/constants-float64-eps": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/number-float32-base-assert-is-almost-equal": "github:stdlib-js/number-float32-base-assert-is-almost-equal#main", - "@stdlib/number-float32-base-assert-is-almost-same-value": "github:stdlib-js/number-float32-base-assert-is-almost-same-value#main", - "@stdlib/number-float64-base-assert-is-almost-equal": "github:stdlib-js/number-float64-base-assert-is-almost-equal#main", - "@stdlib/number-float64-base-assert-is-almost-same-value": "github:stdlib-js/number-float64-base-assert-is-almost-same-value#main", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/random-array-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..29bcd52 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index fea45a5..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.strictEqual( keys.length > 0, true, 'has keys' ); - t.end(); -}); From ca25368f0672926a2058e12e5e7cbbed97c708c9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 18 Dec 2025 04:39:15 +0000 Subject: [PATCH 169/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e863979..81ccb8b 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 2dbaca2053656e4314c568f6405da32cf363c0ef Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 18 Dec 2025 04:39:38 +0000 Subject: [PATCH 170/208] Remove files --- index.d.ts | 798 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5645 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index efb2d70..0000000 --- a/index.d.ts +++ /dev/null @@ -1,798 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasAlmostEqualValues = require( '@stdlib/array-base-assert-has-almost-equal-values' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have respective elements which are approximately equal within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately equal - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostEqualValues( x, y, 0 ); - * // returns true - */ - hasAlmostEqualValues: typeof hasAlmostEqualValues; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 3d52c3c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",b),s(q,"isFloatingPointDataType",v),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index e2091b4..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;yhNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 29bcd52..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 0cf7d42416d49393b2dbae8b4ab39816cfe4d0fb Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 18 Dec 2025 04:40:54 +0000 Subject: [PATCH 171/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 199 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 509 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 103 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 276 - package.json | 125 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4899 insertions(+), 4513 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -213,7 +210,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -278,57 +275,57 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values +[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values/tree/esm -[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values +[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0143c67..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasAlmostEqualValues",require('@stdlib/array-base-assert-has-almost-equal-values/dist'));r(e,"hasAlmostSameValues",require('@stdlib/array-base-assert-has-almost-same-values/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 3c91d0d..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nsetReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nsetReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,uBAAwB,QAAS,mDAAoD,CAAE,EASxGD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..3d52c3c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",b),s(q,"isFloatingPointDataType",v),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e2091b4 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;yhNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index f9c2c4b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,276 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasAlmostEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values} -*/ -setReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) ); - -/** -* @name hasAlmostSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-same-values} -*/ -setReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 81ccb8b..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,105 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-almost-equal-values": "github:stdlib-js/array-base-assert-has-almost-equal-values#main", - "@stdlib/array-base-assert-has-almost-same-values": "github:stdlib-js/array-base-assert-has-almost-same-values#main", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "github:stdlib-js/array-base-assert-is-sorted-ascending#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-almost-equal": "github:stdlib-js/assert-is-almost-equal#main", - "@stdlib/assert-is-almost-same-value": "github:stdlib-js/assert-is-almost-same-value#main", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/constants-float32-eps": "^0.2.2", - "@stdlib/constants-float64-eps": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/number-float32-base-assert-is-almost-equal": "github:stdlib-js/number-float32-base-assert-is-almost-equal#main", - "@stdlib/number-float32-base-assert-is-almost-same-value": "github:stdlib-js/number-float32-base-assert-is-almost-same-value#main", - "@stdlib/number-float64-base-assert-is-almost-equal": "github:stdlib-js/number-float64-base-assert-is-almost-equal#main", - "@stdlib/number-float64-base-assert-is-almost-same-value": "github:stdlib-js/number-float64-base-assert-is-almost-same-value#main", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/random-array-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..29bcd52 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index fea45a5..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.strictEqual( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 5ff165b77c4a80dc8dc0b43af858e63c5708e91c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 18 Dec 2025 04:48:52 +0000 Subject: [PATCH 172/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e863979..81ccb8b 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From cca7b11751f9a67945b5292a484626f28d3d2625 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 18 Dec 2025 04:53:00 +0000 Subject: [PATCH 173/208] Remove files --- index.d.ts | 798 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5645 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index efb2d70..0000000 --- a/index.d.ts +++ /dev/null @@ -1,798 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasAlmostEqualValues = require( '@stdlib/array-base-assert-has-almost-equal-values' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have respective elements which are approximately equal within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately equal - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostEqualValues( x, y, 0 ); - * // returns true - */ - hasAlmostEqualValues: typeof hasAlmostEqualValues; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 3d52c3c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",b),s(q,"isFloatingPointDataType",v),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index e2091b4..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;yhNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 29bcd52..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 5221e7d9e06fd27521f07a216681f5909f2ae359 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 18 Dec 2025 04:53:55 +0000 Subject: [PATCH 174/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 199 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 511 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 103 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 276 - package.json | 125 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4899 insertions(+), 4515 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -213,7 +210,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -278,57 +275,57 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values +[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values/tree/esm -[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values +[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0143c67..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasAlmostEqualValues",require('@stdlib/array-base-assert-has-almost-equal-values/dist'));r(e,"hasAlmostSameValues",require('@stdlib/array-base-assert-has-almost-same-values/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 3c91d0d..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nsetReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nsetReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,uBAAwB,QAAS,mDAAoD,CAAE,EASxGD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..3d52c3c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",b),s(q,"isFloatingPointDataType",v),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e2091b4 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;yhNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index f9c2c4b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,276 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasAlmostEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values} -*/ -setReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) ); - -/** -* @name hasAlmostSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-same-values} -*/ -setReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 81ccb8b..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,105 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-almost-equal-values": "github:stdlib-js/array-base-assert-has-almost-equal-values#main", - "@stdlib/array-base-assert-has-almost-same-values": "github:stdlib-js/array-base-assert-has-almost-same-values#main", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "github:stdlib-js/array-base-assert-is-sorted-ascending#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-almost-equal": "github:stdlib-js/assert-is-almost-equal#main", - "@stdlib/assert-is-almost-same-value": "github:stdlib-js/assert-is-almost-same-value#main", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/constants-float32-eps": "^0.2.2", - "@stdlib/constants-float64-eps": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/number-float32-base-assert-is-almost-equal": "github:stdlib-js/number-float32-base-assert-is-almost-equal#main", - "@stdlib/number-float32-base-assert-is-almost-same-value": "github:stdlib-js/number-float32-base-assert-is-almost-same-value#main", - "@stdlib/number-float64-base-assert-is-almost-equal": "github:stdlib-js/number-float64-base-assert-is-almost-equal#main", - "@stdlib/number-float64-base-assert-is-almost-same-value": "github:stdlib-js/number-float64-base-assert-is-almost-same-value#main", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/random-array-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..29bcd52 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index fea45a5..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.strictEqual( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 722f3f368bc6f152d6315795e1be7fc4d67dae06 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 29 Dec 2025 00:41:52 +0000 Subject: [PATCH 175/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e863979..81ccb8b 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 158b267dcec586537331d203cfab79618aad2845 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 29 Dec 2025 00:43:27 +0000 Subject: [PATCH 176/208] Remove files --- index.d.ts | 820 --------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5667 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a066da6..0000000 --- a/index.d.ts +++ /dev/null @@ -1,820 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasAlmostEqualValues = require( '@stdlib/array-base-assert-has-almost-equal-values' ); -import hasAlmostSameValues = require( '@stdlib/array-base-assert-has-almost-same-values' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have respective elements which are approximately equal within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately equal - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostEqualValues( x, y, 0 ); - * // returns true - */ - hasAlmostEqualValues: typeof hasAlmostEqualValues; - - /** - * Tests if two arrays have respective elements which are approximately the same value within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately the same value - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostSameValues( x, y, 0 ); - * // returns true - */ - hasAlmostSameValues: typeof hasAlmostSameValues; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 3d52c3c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",b),s(q,"isFloatingPointDataType",v),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index e2091b4..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;yhNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 29bcd52..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 0988ebb143804fe9d41a15d5f47d8485296e4e31 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 29 Dec 2025 00:44:08 +0000 Subject: [PATCH 177/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 199 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 511 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 103 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 276 - package.json | 125 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 41 files changed, 4899 insertions(+), 4516 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 9b77eec..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2025-12-29T00:41:27.674Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -213,7 +210,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -278,57 +275,57 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values +[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values/tree/esm -[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values +[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0143c67..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasAlmostEqualValues",require('@stdlib/array-base-assert-has-almost-equal-values/dist'));r(e,"hasAlmostSameValues",require('@stdlib/array-base-assert-has-almost-same-values/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 3c91d0d..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nsetReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nsetReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,uBAAwB,QAAS,mDAAoD,CAAE,EASxGD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..3d52c3c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",b),s(q,"isFloatingPointDataType",v),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e2091b4 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;yhNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index f9c2c4b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,276 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasAlmostEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values} -*/ -setReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) ); - -/** -* @name hasAlmostSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-same-values} -*/ -setReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 81ccb8b..585dbe9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,105 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-almost-equal-values": "github:stdlib-js/array-base-assert-has-almost-equal-values#main", - "@stdlib/array-base-assert-has-almost-same-values": "github:stdlib-js/array-base-assert-has-almost-same-values#main", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "github:stdlib-js/array-base-assert-is-byte-order#main", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "github:stdlib-js/array-base-assert-is-sorted-ascending#main", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.0", - "@stdlib/array-byte-orders": "github:stdlib-js/array-byte-orders#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.0", - "@stdlib/array-complex64": "^0.3.0", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.3.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-almost-equal": "github:stdlib-js/assert-is-almost-equal#main", - "@stdlib/assert-is-almost-same-value": "github:stdlib-js/assert-is-almost-same-value#main", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/constants-float32-eps": "^0.2.2", - "@stdlib/constants-float64-eps": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/number-float32-base-assert-is-almost-equal": "github:stdlib-js/number-float32-base-assert-is-almost-equal#main", - "@stdlib/number-float32-base-assert-is-almost-same-value": "github:stdlib-js/number-float32-base-assert-is-almost-same-value#main", - "@stdlib/number-float64-base-assert-is-almost-equal": "github:stdlib-js/number-float64-base-assert-is-almost-equal#main", - "@stdlib/number-float64-base-assert-is-almost-same-value": "github:stdlib-js/number-float64-base-assert-is-almost-same-value#main", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/random-array-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..29bcd52 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index fea45a5..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.strictEqual( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 9065e8b1edda4421b2006b343b5898ff2fa9f7c8 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 31 Jan 2026 07:37:39 +0000 Subject: [PATCH 178/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 471f16a..2e9462b 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-constructor-name": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", From 3d4afccf5aa2c5a4434fa790a912e38676865365 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 31 Jan 2026 08:35:29 +0000 Subject: [PATCH 179/208] Remove files --- index.d.ts | 820 --------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5667 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a066da6..0000000 --- a/index.d.ts +++ /dev/null @@ -1,820 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasAlmostEqualValues = require( '@stdlib/array-base-assert-has-almost-equal-values' ); -import hasAlmostSameValues = require( '@stdlib/array-base-assert-has-almost-same-values' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have respective elements which are approximately equal within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately equal - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostEqualValues( x, y, 0 ); - * // returns true - */ - hasAlmostEqualValues: typeof hasAlmostEqualValues; - - /** - * Tests if two arrays have respective elements which are approximately the same value within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately the same value - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostSameValues( x, y, 0 ); - * // returns true - */ - hasAlmostSameValues: typeof hasAlmostSameValues; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 3d52c3c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",b),s(q,"isFloatingPointDataType",v),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index e2091b4..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;yhNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 29bcd52..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From f1657ea63f1ded098475e0bf4c0dbf7665cbe659 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 31 Jan 2026 08:35:59 +0000 Subject: [PATCH 180/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 821 --- .github/workflows/publish.yml | 261 - .github/workflows/test.yml | 108 - .github/workflows/test_bundles.yml | 213 - .github/workflows/test_coverage.yml | 142 - .github/workflows/test_install.yml | 94 - .github/workflows/test_published_package.yml | 115 - .gitignore | 199 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 515 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 103 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 276 - package.json | 125 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4899 insertions(+), 4619 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 83d50c4..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,821 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send notification to Zulip if job fails: - - name: 'Send notification to Zulip in case of failure' - # Pin action to full length commit SHA - uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2 - if: failure() - with: - api-key: ${{ secrets.ZULIP_API_KEY }} - email: 'github-actions-bot@stdlib.zulipchat.com' - organization-url: 'https://stdlib.zulipchat.com' - to: 'workflows-standalone' - type: 'stream' - topic: ${{ github.event.repository.name }} - content: | - :cross_mark: **${{ github.workflow }}** workflow failed - - **Repository:** [${{ github.repository }}](${{ github.server_url }}/${{ github.repository }}) - **Run:** [View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -213,7 +210,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -278,57 +275,57 @@ Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values +[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values/tree/esm -[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values +[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0143c67..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasAlmostEqualValues",require('@stdlib/array-base-assert-has-almost-equal-values/dist'));r(e,"hasAlmostSameValues",require('@stdlib/array-base-assert-has-almost-same-values/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 3c91d0d..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nsetReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nsetReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,uBAAwB,QAAS,mDAAoD,CAAE,EASxGD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..192aeb8 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.0-esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.0-esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.0-esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.0-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",b),s(q,"isFloatingPointDataType",v),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..0b3016a --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;mkNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index f9c2c4b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,276 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasAlmostEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values} -*/ -setReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) ); - -/** -* @name hasAlmostSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-same-values} -*/ -setReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 2e9462b..09f822d 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.4.0", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,105 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-almost-equal-values": "github:stdlib-js/array-base-assert-has-almost-equal-values#main", - "@stdlib/array-base-assert-has-almost-same-values": "github:stdlib-js/array-base-assert-has-almost-same-values#main", - "@stdlib/array-base-assert-has-equal-values": "github:stdlib-js/array-base-assert-has-equal-values#main", - "@stdlib/array-base-assert-has-equal-values-indexed": "^0.1.0", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.2", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.1", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.2", - "@stdlib/array-base-assert-is-byte-order": "^0.1.0", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.2", - "@stdlib/array-base-assert-is-complex128array": "^0.2.2", - "@stdlib/array-base-assert-is-complex64array": "^0.2.2", - "@stdlib/array-base-assert-is-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.2", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/array-base-assert-is-sorted-ascending": "^0.1.0", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.2", - "@stdlib/array-base-arraylike2object": "^0.2.1", - "@stdlib/array-base-getter": "^0.2.2", - "@stdlib/array-base-ones": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/array-base-zeros": "^0.2.2", - "@stdlib/array-bool": "^0.1.1", - "@stdlib/array-byte-orders": "^0.1.0", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/array-complex128": "^0.3.1", - "@stdlib/array-complex64": "^0.3.1", - "@stdlib/array-dtype": "^0.3.0", - "@stdlib/array-dtypes": "^0.4.0", - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-int16": "^0.2.2", - "@stdlib/array-int32": "^0.2.2", - "@stdlib/array-int8": "^0.2.2", - "@stdlib/array-mostly-safe-casts": "^0.4.0", - "@stdlib/array-safe-casts": "^0.3.0", - "@stdlib/array-same-kind-casts": "^0.3.0", - "@stdlib/array-uint16": "^0.2.2", - "@stdlib/array-uint32": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/array-uint8c": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-almost-equal": "^0.1.0", - "@stdlib/assert-is-almost-same-value": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-same-value": "^0.2.2", - "@stdlib/buffer-alloc-unsafe": "^0.2.2", - "@stdlib/constants-float32-eps": "^0.2.2", - "@stdlib/constants-float64-eps": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/number-float32-base-assert-is-almost-equal": "^0.1.0", - "@stdlib/number-float32-base-assert-is-almost-same-value": "^0.1.0", - "@stdlib/number-float64-base-assert-is-almost-equal": "^0.1.0", - "@stdlib/number-float64-base-assert-is-almost-same-value": "^0.1.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/random-array-uniform": "^0.2.1", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.2", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.2", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-constructor-name": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..a5245e4 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index fea45a5..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.strictEqual( keys.length > 0, true, 'has keys' ); - t.end(); -}); From bc2c117bb3b1788907f9f3e06a3cd5154f247489 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 31 Jan 2026 08:54:21 +0000 Subject: [PATCH 181/208] Update README.md for ESM bundle v0.4.0 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aac674a..16f8a8f 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ limitations under the License. ## Usage ```javascript -import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@esm/index.mjs'; +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@v0.4.0-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { contains, hasAlmostEqualValues, hasAlmostSameValues, hasEqualValues, hasEqualValuesIndexed, hasSameValues, isAccessorArray, isBooleanArray, isBooleanDataType, isByteOrder, isComplex128Array, isComplex64Array, isComplexFloatingPointDataType, isComplexTypedArray, isDataType, isFloatingPointDataType, isIntegerDataType, isMostlySafeDataTypeCast, isNumericDataType, isRealDataType, isRealFloatingPointDataType, isSafeDataTypeCast, isSameKindDataTypeCast, isSignedIntegerDataType, isSortedAscending, isUnsignedIntegerDataType } from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@esm/index.mjs'; +import { contains, hasAlmostEqualValues, hasAlmostSameValues, hasEqualValues, hasEqualValuesIndexed, hasSameValues, isAccessorArray, isBooleanArray, isBooleanDataType, isByteOrder, isComplex128Array, isComplex64Array, isComplexFloatingPointDataType, isComplexTypedArray, isDataType, isFloatingPointDataType, isIntegerDataType, isMostlySafeDataTypeCast, isNumericDataType, isRealDataType, isRealFloatingPointDataType, isSafeDataTypeCast, isSameKindDataTypeCast, isSignedIntegerDataType, isSortedAscending, isUnsignedIntegerDataType } from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@v0.4.0-esm/index.mjs'; ``` #### ns @@ -115,7 +115,7 @@ The namespace exports the following: - - - - From 1b308ca68c37ccf1de48b1f31d95b7ea1e47f591 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 9 Feb 2026 00:54:17 +0000 Subject: [PATCH 185/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 821 --- .github/workflows/publish.yml | 261 - .github/workflows/test.yml | 101 - .github/workflows/test_bundles.yml | 213 - .github/workflows/test_coverage.yml | 142 - .github/workflows/test_install.yml | 94 - .github/workflows/test_published_package.yml | 115 - .gitignore | 199 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 525 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 103 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 276 - package.json | 125 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4899 insertions(+), 4622 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 83d50c4..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,821 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send notification to Zulip if job fails: - - name: 'Send notification to Zulip in case of failure' - # Pin action to full length commit SHA - uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2 - if: failure() - with: - api-key: ${{ secrets.ZULIP_API_KEY }} - email: 'github-actions-bot@stdlib.zulipchat.com' - organization-url: 'https://stdlib.zulipchat.com' - to: 'workflows-standalone' - type: 'stream' - topic: ${{ github.event.repository.name }} - content: | - :cross_mark: **${{ github.workflow }}** workflow failed - - **Repository:** [${{ github.repository }}](${{ github.server_url }}/${{ github.repository }}) - **Run:** [View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -213,7 +210,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -278,57 +275,57 @@ Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values +[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values/tree/esm -[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values +[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0143c67..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasAlmostEqualValues",require('@stdlib/array-base-assert-has-almost-equal-values/dist'));r(e,"hasAlmostSameValues",require('@stdlib/array-base-assert-has-almost-same-values/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 3c91d0d..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nsetReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nsetReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,uBAAwB,QAAS,mDAAoD,CAAE,EASxGD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..d0c2187 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.3-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.0-esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.0-esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.0-esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",v),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c765bf0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;6mNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index f9c2c4b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,276 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasAlmostEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values} -*/ -setReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) ); - -/** -* @name hasAlmostSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-same-values} -*/ -setReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index f476664..ebd9b01 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.4.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,105 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.3", - "@stdlib/array-base-assert-has-almost-equal-values": "^0.1.0", - "@stdlib/array-base-assert-has-almost-same-values": "^0.1.0", - "@stdlib/array-base-assert-has-equal-values": "^0.1.0", - "@stdlib/array-base-assert-has-equal-values-indexed": "^0.1.1", - "@stdlib/array-base-assert-has-same-values": "^0.3.0", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.3", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.2", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.3", - "@stdlib/array-base-assert-is-byte-order": "^0.1.1", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.3", - "@stdlib/array-base-assert-is-complex128array": "^0.2.3", - "@stdlib/array-base-assert-is-complex64array": "^0.2.3", - "@stdlib/array-base-assert-is-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.3", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.3", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.3", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-sorted-ascending": "^0.1.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.3" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.2", - "@stdlib/array-base-accessor-getter": "^0.2.3", - "@stdlib/array-base-arraylike2object": "^0.2.2", - "@stdlib/array-base-getter": "^0.2.3", - "@stdlib/array-base-ones": "^0.2.3", - "@stdlib/array-base-zero-to": "^0.2.2", - "@stdlib/array-base-zeros": "^0.2.3", - "@stdlib/array-bool": "^0.1.2", - "@stdlib/array-byte-orders": "^0.1.1", - "@stdlib/array-cartesian-square": "^0.2.3", - "@stdlib/array-complex128": "^0.3.2", - "@stdlib/array-complex64": "^0.3.2", - "@stdlib/array-dtype": "^0.3.1", - "@stdlib/array-dtypes": "^0.4.1", - "@stdlib/array-float32": "^0.2.3", - "@stdlib/array-float64": "^0.2.3", - "@stdlib/array-int16": "^0.2.3", - "@stdlib/array-int32": "^0.2.3", - "@stdlib/array-int8": "^0.2.3", - "@stdlib/array-mostly-safe-casts": "^0.4.1", - "@stdlib/array-safe-casts": "^0.3.1", - "@stdlib/array-same-kind-casts": "^0.3.1", - "@stdlib/array-uint16": "^0.2.3", - "@stdlib/array-uint32": "^0.2.3", - "@stdlib/array-uint8": "^0.2.3", - "@stdlib/array-uint8c": "^0.2.3", - "@stdlib/assert-has-own-property": "^0.2.3", - "@stdlib/assert-is-almost-equal": "^0.1.1", - "@stdlib/assert-is-almost-same-value": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.2.3", - "@stdlib/assert-is-collection": "^0.2.3", - "@stdlib/assert-is-same-value": "^0.2.3", - "@stdlib/buffer-alloc-unsafe": "^0.2.3", - "@stdlib/constants-float32-eps": "^0.2.3", - "@stdlib/constants-float64-eps": "^0.2.3", - "@stdlib/math-base-special-pow": "^0.3.1", - "@stdlib/number-float32-base-assert-is-almost-equal": "^0.0.1", - "@stdlib/number-float32-base-assert-is-almost-same-value": "^0.1.1", - "@stdlib/number-float64-base-assert-is-almost-equal": "^0.0.1", - "@stdlib/number-float64-base-assert-is-almost-same-value": "^0.1.1", - "@stdlib/random-array-discrete-uniform": "^0.2.2", - "@stdlib/random-array-uniform": "^0.2.2", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.3", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.3", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.3", - "@stdlib/utils-constructor-name": "^0.2.3", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.3", - "@stdlib/utils-keys": "^0.2.3", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.3" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..ac843d1 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index fea45a5..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.strictEqual( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 5301618b1cdeffde2452a739b68499a8d2bab554 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 9 Feb 2026 01:02:13 +0000 Subject: [PATCH 186/208] Update README.md for ESM bundle v0.4.1 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a22906e..d267793 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ limitations under the License. ## Usage ```javascript -import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@esm/index.mjs'; +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@v0.4.1-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { contains, hasAlmostEqualValues, hasAlmostSameValues, hasEqualValues, hasEqualValuesIndexed, hasSameValues, isAccessorArray, isBooleanArray, isBooleanDataType, isByteOrder, isComplex128Array, isComplex64Array, isComplexFloatingPointDataType, isComplexTypedArray, isDataType, isFloatingPointDataType, isIntegerDataType, isMostlySafeDataTypeCast, isNumericDataType, isRealDataType, isRealFloatingPointDataType, isSafeDataTypeCast, isSameKindDataTypeCast, isSignedIntegerDataType, isSortedAscending, isUnsignedIntegerDataType } from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@esm/index.mjs'; +import { contains, hasAlmostEqualValues, hasAlmostSameValues, hasEqualValues, hasEqualValuesIndexed, hasSameValues, isAccessorArray, isBooleanArray, isBooleanDataType, isByteOrder, isComplex128Array, isComplex64Array, isComplexFloatingPointDataType, isComplexTypedArray, isDataType, isFloatingPointDataType, isIntegerDataType, isMostlySafeDataTypeCast, isNumericDataType, isRealDataType, isRealFloatingPointDataType, isSafeDataTypeCast, isSameKindDataTypeCast, isSignedIntegerDataType, isSortedAscending, isUnsignedIntegerDataType } from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert@v0.4.1-esm/index.mjs'; ``` #### ns @@ -115,7 +115,7 @@ The namespace exports the following: - - - - From 612b17d7902eaf3234cad772b78d5244da0ad48c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 9 Mar 2026 00:57:23 +0000 Subject: [PATCH 190/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 821 --- .github/workflows/publish.yml | 261 - .github/workflows/test.yml | 101 - .github/workflows/test_bundles.yml | 213 - .github/workflows/test_coverage.yml | 142 - .github/workflows/test_install.yml | 94 - .github/workflows/test_published_package.yml | 115 - .gitignore | 199 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 561 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 103 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 276 - package.json | 125 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 41 files changed, 4899 insertions(+), 4659 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index d2d3b94..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2026-03-09T00:47:02.238Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 83d50c4..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,821 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send notification to Zulip if job fails: - - name: 'Send notification to Zulip in case of failure' - # Pin action to full length commit SHA - uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2 - if: failure() - with: - api-key: ${{ secrets.ZULIP_API_KEY }} - email: 'github-actions-bot@stdlib.zulipchat.com' - organization-url: 'https://stdlib.zulipchat.com' - to: 'workflows-standalone' - type: 'stream' - topic: ${{ github.event.repository.name }} - content: | - :cross_mark: **${{ github.workflow }}** workflow failed - - **Repository:** [${{ github.repository }}](${{ github.server_url }}/${{ github.repository }}) - **Run:** [View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -213,7 +210,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -278,57 +275,57 @@ Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values +[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values/tree/esm -[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values +[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0143c67..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasAlmostEqualValues",require('@stdlib/array-base-assert-has-almost-equal-values/dist'));r(e,"hasAlmostSameValues",require('@stdlib/array-base-assert-has-almost-same-values/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 3c91d0d..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nsetReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nsetReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,uBAAwB,QAAS,mDAAoD,CAAE,EASxGD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..f5f0593 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.3-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",v),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c765bf0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;6mNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index f9c2c4b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,276 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasAlmostEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values} -*/ -setReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) ); - -/** -* @name hasAlmostSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-same-values} -*/ -setReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 826b4bc..ebd9b01 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.4.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,105 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.3", - "@stdlib/array-base-assert-has-almost-equal-values": "^0.1.1", - "@stdlib/array-base-assert-has-almost-same-values": "^0.1.1", - "@stdlib/array-base-assert-has-equal-values": "^0.1.1", - "@stdlib/array-base-assert-has-equal-values-indexed": "^0.1.1", - "@stdlib/array-base-assert-has-same-values": "^0.3.1", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.3", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.2", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.3", - "@stdlib/array-base-assert-is-byte-order": "^0.1.1", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.3", - "@stdlib/array-base-assert-is-complex128array": "^0.2.3", - "@stdlib/array-base-assert-is-complex64array": "^0.2.3", - "@stdlib/array-base-assert-is-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.3", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.3", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.3", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-sorted-ascending": "^0.1.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.3" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.3", - "@stdlib/array-base-accessor-getter": "^0.2.3", - "@stdlib/array-base-arraylike2object": "^0.2.2", - "@stdlib/array-base-getter": "^0.2.3", - "@stdlib/array-base-ones": "^0.2.3", - "@stdlib/array-base-zero-to": "^0.2.2", - "@stdlib/array-base-zeros": "^0.2.3", - "@stdlib/array-bool": "^0.1.2", - "@stdlib/array-byte-orders": "^0.1.1", - "@stdlib/array-cartesian-square": "^0.2.3", - "@stdlib/array-complex128": "^0.3.2", - "@stdlib/array-complex64": "^0.3.2", - "@stdlib/array-dtype": "^0.3.1", - "@stdlib/array-dtypes": "^0.4.1", - "@stdlib/array-float32": "^0.2.3", - "@stdlib/array-float64": "^0.2.3", - "@stdlib/array-int16": "^0.2.3", - "@stdlib/array-int32": "^0.2.3", - "@stdlib/array-int8": "^0.2.3", - "@stdlib/array-mostly-safe-casts": "^0.4.1", - "@stdlib/array-safe-casts": "^0.3.1", - "@stdlib/array-same-kind-casts": "^0.3.1", - "@stdlib/array-uint16": "^0.2.3", - "@stdlib/array-uint32": "^0.2.3", - "@stdlib/array-uint8": "^0.2.3", - "@stdlib/array-uint8c": "^0.2.3", - "@stdlib/assert-has-own-property": "^0.2.3", - "@stdlib/assert-is-almost-equal": "^0.1.1", - "@stdlib/assert-is-almost-same-value": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.2.3", - "@stdlib/assert-is-collection": "^0.2.3", - "@stdlib/assert-is-same-value": "^0.2.3", - "@stdlib/buffer-alloc-unsafe": "^0.2.3", - "@stdlib/constants-float32-eps": "^0.2.3", - "@stdlib/constants-float64-eps": "^0.2.3", - "@stdlib/math-base-special-pow": "^0.3.1", - "@stdlib/number-float32-base-assert-is-almost-equal": "^0.0.1", - "@stdlib/number-float32-base-assert-is-almost-same-value": "^0.1.1", - "@stdlib/number-float64-base-assert-is-almost-equal": "^0.0.1", - "@stdlib/number-float64-base-assert-is-almost-same-value": "^0.1.1", - "@stdlib/random-array-discrete-uniform": "^0.2.2", - "@stdlib/random-array-uniform": "^0.2.2", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.3", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.3", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.3", - "@stdlib/utils-constructor-name": "^0.2.3", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.3", - "@stdlib/utils-keys": "^0.2.3", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.3" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..a8a7310 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index fea45a5..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.strictEqual( keys.length > 0, true, 'has keys' ); - t.end(); -}); From b723330537ebbcc9ad3ddc8c176558c05d5c2cab Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 16 Mar 2026 00:56:09 +0000 Subject: [PATCH 191/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d1010f9..826b4bc 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.3", "@stdlib/strided-base-reinterpret-complex128": "^0.2.3", "@stdlib/strided-base-reinterpret-complex64": "^0.2.2", - "@stdlib/string-format": "^0.2.3", + "@stdlib/error-tools-fmtprodmsg": "^0.2.3", "@stdlib/utils-constructor-name": "^0.2.3", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.3", "@stdlib/utils-keys": "^0.2.3", From 56e57806e9fca50aa9ab859c2bb2b44d0138b7e2 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 16 Mar 2026 01:08:23 +0000 Subject: [PATCH 192/208] Remove files --- index.d.ts | 820 --------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5667 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a066da6..0000000 --- a/index.d.ts +++ /dev/null @@ -1,820 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasAlmostEqualValues = require( '@stdlib/array-base-assert-has-almost-equal-values' ); -import hasAlmostSameValues = require( '@stdlib/array-base-assert-has-almost-same-values' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have respective elements which are approximately equal within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately equal - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostEqualValues( x, y, 0 ); - * // returns true - */ - hasAlmostEqualValues: typeof hasAlmostEqualValues; - - /** - * Tests if two arrays have respective elements which are approximately the same value within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately the same value - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostSameValues( x, y, 0 ); - * // returns true - */ - hasAlmostSameValues: typeof hasAlmostSameValues; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index f5f0593..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.3-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",v),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c765bf0..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;6mNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index a8a7310..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From bbc5f48deb2882d279da719f2a936f52d2c7c77a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 16 Mar 2026 01:08:56 +0000 Subject: [PATCH 193/208] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 821 --- .github/workflows/publish.yml | 261 - .github/workflows/test.yml | 101 - .github/workflows/test_bundles.yml | 213 - .github/workflows/test_coverage.yml | 142 - .github/workflows/test_install.yml | 94 - .github/workflows/test_published_package.yml | 115 - .gitignore | 199 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 561 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 103 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 276 - package.json | 125 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 41 files changed, 4899 insertions(+), 4659 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 2bd4eae..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2026-03-16T00:53:18.084Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 83d50c4..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,821 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send notification to Zulip if job fails: - - name: 'Send notification to Zulip in case of failure' - # Pin action to full length commit SHA - uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2 - if: failure() - with: - api-key: ${{ secrets.ZULIP_API_KEY }} - email: 'github-actions-bot@stdlib.zulipchat.com' - organization-url: 'https://stdlib.zulipchat.com' - to: 'workflows-standalone' - type: 'stream' - topic: ${{ github.event.repository.name }} - content: | - :cross_mark: **${{ github.workflow }}** workflow failed - - **Repository:** [${{ github.repository }}](${{ github.server_url }}/${{ github.repository }}) - **Run:** [View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -213,7 +210,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -278,57 +275,57 @@ Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values +[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values/tree/esm -[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values +[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0143c67..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasAlmostEqualValues",require('@stdlib/array-base-assert-has-almost-equal-values/dist'));r(e,"hasAlmostSameValues",require('@stdlib/array-base-assert-has-almost-same-values/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 3c91d0d..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nsetReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nsetReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,uBAAwB,QAAS,mDAAoD,CAAE,EASxGD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..f5f0593 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.3-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",v),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c765bf0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;6mNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index f9c2c4b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,276 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasAlmostEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values} -*/ -setReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) ); - -/** -* @name hasAlmostSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-same-values} -*/ -setReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 826b4bc..ebd9b01 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.4.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,105 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.3", - "@stdlib/array-base-assert-has-almost-equal-values": "^0.1.1", - "@stdlib/array-base-assert-has-almost-same-values": "^0.1.1", - "@stdlib/array-base-assert-has-equal-values": "^0.1.1", - "@stdlib/array-base-assert-has-equal-values-indexed": "^0.1.1", - "@stdlib/array-base-assert-has-same-values": "^0.3.1", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.3", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.2", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.3", - "@stdlib/array-base-assert-is-byte-order": "^0.1.1", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.3", - "@stdlib/array-base-assert-is-complex128array": "^0.2.3", - "@stdlib/array-base-assert-is-complex64array": "^0.2.3", - "@stdlib/array-base-assert-is-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.3", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.3", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.3", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-sorted-ascending": "^0.1.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.3" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.3", - "@stdlib/array-base-accessor-getter": "^0.2.3", - "@stdlib/array-base-arraylike2object": "^0.2.2", - "@stdlib/array-base-getter": "^0.2.3", - "@stdlib/array-base-ones": "^0.2.3", - "@stdlib/array-base-zero-to": "^0.2.2", - "@stdlib/array-base-zeros": "^0.2.3", - "@stdlib/array-bool": "^0.1.2", - "@stdlib/array-byte-orders": "^0.1.1", - "@stdlib/array-cartesian-square": "^0.2.3", - "@stdlib/array-complex128": "^0.3.2", - "@stdlib/array-complex64": "^0.3.2", - "@stdlib/array-dtype": "^0.3.1", - "@stdlib/array-dtypes": "^0.4.1", - "@stdlib/array-float32": "^0.2.3", - "@stdlib/array-float64": "^0.2.3", - "@stdlib/array-int16": "^0.2.3", - "@stdlib/array-int32": "^0.2.3", - "@stdlib/array-int8": "^0.2.3", - "@stdlib/array-mostly-safe-casts": "^0.4.1", - "@stdlib/array-safe-casts": "^0.3.1", - "@stdlib/array-same-kind-casts": "^0.3.1", - "@stdlib/array-uint16": "^0.2.3", - "@stdlib/array-uint32": "^0.2.3", - "@stdlib/array-uint8": "^0.2.3", - "@stdlib/array-uint8c": "^0.2.3", - "@stdlib/assert-has-own-property": "^0.2.3", - "@stdlib/assert-is-almost-equal": "^0.1.1", - "@stdlib/assert-is-almost-same-value": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.2.3", - "@stdlib/assert-is-collection": "^0.2.3", - "@stdlib/assert-is-same-value": "^0.2.3", - "@stdlib/buffer-alloc-unsafe": "^0.2.3", - "@stdlib/constants-float32-eps": "^0.2.3", - "@stdlib/constants-float64-eps": "^0.2.3", - "@stdlib/math-base-special-pow": "^0.3.1", - "@stdlib/number-float32-base-assert-is-almost-equal": "^0.0.1", - "@stdlib/number-float32-base-assert-is-almost-same-value": "^0.1.1", - "@stdlib/number-float64-base-assert-is-almost-equal": "^0.0.1", - "@stdlib/number-float64-base-assert-is-almost-same-value": "^0.1.1", - "@stdlib/random-array-discrete-uniform": "^0.2.2", - "@stdlib/random-array-uniform": "^0.2.2", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.3", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.3", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.3", - "@stdlib/utils-constructor-name": "^0.2.3", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.3", - "@stdlib/utils-keys": "^0.2.3", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.3" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..a8a7310 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index fea45a5..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.strictEqual( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 0ac4345089189648406b6a7255dcf7d21977d57a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 11 Apr 2026 03:51:55 +0000 Subject: [PATCH 194/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d1010f9..826b4bc 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.3", "@stdlib/strided-base-reinterpret-complex128": "^0.2.3", "@stdlib/strided-base-reinterpret-complex64": "^0.2.2", - "@stdlib/string-format": "^0.2.3", + "@stdlib/error-tools-fmtprodmsg": "^0.2.3", "@stdlib/utils-constructor-name": "^0.2.3", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.3", "@stdlib/utils-keys": "^0.2.3", From 066bc44cb630c997621d55a4006ffe7770411ee8 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 11 Apr 2026 04:20:17 +0000 Subject: [PATCH 195/208] Remove files --- index.d.ts | 820 --------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5667 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a066da6..0000000 --- a/index.d.ts +++ /dev/null @@ -1,820 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasAlmostEqualValues = require( '@stdlib/array-base-assert-has-almost-equal-values' ); -import hasAlmostSameValues = require( '@stdlib/array-base-assert-has-almost-same-values' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have respective elements which are approximately equal within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately equal - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostEqualValues( x, y, 0 ); - * // returns true - */ - hasAlmostEqualValues: typeof hasAlmostEqualValues; - - /** - * Tests if two arrays have respective elements which are approximately the same value within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately the same value - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostSameValues( x, y, 0 ); - * // returns true - */ - hasAlmostSameValues: typeof hasAlmostSameValues; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index f5f0593..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.3-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",v),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c765bf0..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;6mNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index a8a7310..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From e1a69a815acb9e6aedfcb5b77a1e24389b68cad6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 11 Apr 2026 04:20:42 +0000 Subject: [PATCH 196/208] Auto-generated commit --- .editorconfig | 189 - .eslintrc.js | 1 - .gitattributes | 68 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 821 --- .github/workflows/publish.yml | 261 - .github/workflows/test.yml | 101 - .github/workflows/test_bundles.yml | 213 - .github/workflows/test_coverage.yml | 142 - .github/workflows/test_install.yml | 94 - .github/workflows/test_published_package.yml | 115 - .gitignore | 199 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 561 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 103 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 276 - package.json | 125 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 41 files changed, 4899 insertions(+), 4670 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 80f3fca..0000000 --- a/.editorconfig +++ /dev/null @@ -1,189 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Ignore generated lock files for GitHub Agentic Workflows: -[*.lock.yml] -charset = unset -end_of_line = unset -indent_style = unset -indent_size = unset -trim_trailing_whitespace = unset -insert_final_newline = unset - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 24b327f..0000000 --- a/.gitattributes +++ /dev/null @@ -1,68 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation - -.github/workflows/*.lock.yml linguist-generated=true merge=ours diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 10304ac..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2026-04-11T03:39:24.133Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 83d50c4..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,821 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send notification to Zulip if job fails: - - name: 'Send notification to Zulip in case of failure' - # Pin action to full length commit SHA - uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2 - if: failure() - with: - api-key: ${{ secrets.ZULIP_API_KEY }} - email: 'github-actions-bot@stdlib.zulipchat.com' - organization-url: 'https://stdlib.zulipchat.com' - to: 'workflows-standalone' - type: 'stream' - topic: ${{ github.event.repository.name }} - content: | - :cross_mark: **${{ github.workflow }}** workflow failed - - **Repository:** [${{ github.repository }}](${{ github.server_url }}/${{ github.repository }}) - **Run:** [View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -213,7 +210,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -278,57 +275,57 @@ Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values +[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values/tree/esm -[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values +[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0143c67..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasAlmostEqualValues",require('@stdlib/array-base-assert-has-almost-equal-values/dist'));r(e,"hasAlmostSameValues",require('@stdlib/array-base-assert-has-almost-same-values/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 3c91d0d..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nsetReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nsetReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,uBAAwB,QAAS,mDAAoD,CAAE,EASxGD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..f5f0593 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.3-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",v),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c765bf0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;6mNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index f9c2c4b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,276 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasAlmostEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values} -*/ -setReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) ); - -/** -* @name hasAlmostSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-same-values} -*/ -setReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 826b4bc..ebd9b01 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.4.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,105 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.3", - "@stdlib/array-base-assert-has-almost-equal-values": "^0.1.1", - "@stdlib/array-base-assert-has-almost-same-values": "^0.1.1", - "@stdlib/array-base-assert-has-equal-values": "^0.1.1", - "@stdlib/array-base-assert-has-equal-values-indexed": "^0.1.1", - "@stdlib/array-base-assert-has-same-values": "^0.3.1", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.3", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.2", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.3", - "@stdlib/array-base-assert-is-byte-order": "^0.1.1", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.3", - "@stdlib/array-base-assert-is-complex128array": "^0.2.3", - "@stdlib/array-base-assert-is-complex64array": "^0.2.3", - "@stdlib/array-base-assert-is-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.3", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.3", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.3", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-sorted-ascending": "^0.1.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.3" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.3", - "@stdlib/array-base-accessor-getter": "^0.2.3", - "@stdlib/array-base-arraylike2object": "^0.2.2", - "@stdlib/array-base-getter": "^0.2.3", - "@stdlib/array-base-ones": "^0.2.3", - "@stdlib/array-base-zero-to": "^0.2.2", - "@stdlib/array-base-zeros": "^0.2.3", - "@stdlib/array-bool": "^0.1.2", - "@stdlib/array-byte-orders": "^0.1.1", - "@stdlib/array-cartesian-square": "^0.2.3", - "@stdlib/array-complex128": "^0.3.2", - "@stdlib/array-complex64": "^0.3.2", - "@stdlib/array-dtype": "^0.3.1", - "@stdlib/array-dtypes": "^0.4.1", - "@stdlib/array-float32": "^0.2.3", - "@stdlib/array-float64": "^0.2.3", - "@stdlib/array-int16": "^0.2.3", - "@stdlib/array-int32": "^0.2.3", - "@stdlib/array-int8": "^0.2.3", - "@stdlib/array-mostly-safe-casts": "^0.4.1", - "@stdlib/array-safe-casts": "^0.3.1", - "@stdlib/array-same-kind-casts": "^0.3.1", - "@stdlib/array-uint16": "^0.2.3", - "@stdlib/array-uint32": "^0.2.3", - "@stdlib/array-uint8": "^0.2.3", - "@stdlib/array-uint8c": "^0.2.3", - "@stdlib/assert-has-own-property": "^0.2.3", - "@stdlib/assert-is-almost-equal": "^0.1.1", - "@stdlib/assert-is-almost-same-value": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.2.3", - "@stdlib/assert-is-collection": "^0.2.3", - "@stdlib/assert-is-same-value": "^0.2.3", - "@stdlib/buffer-alloc-unsafe": "^0.2.3", - "@stdlib/constants-float32-eps": "^0.2.3", - "@stdlib/constants-float64-eps": "^0.2.3", - "@stdlib/math-base-special-pow": "^0.3.1", - "@stdlib/number-float32-base-assert-is-almost-equal": "^0.0.1", - "@stdlib/number-float32-base-assert-is-almost-same-value": "^0.1.1", - "@stdlib/number-float64-base-assert-is-almost-equal": "^0.0.1", - "@stdlib/number-float64-base-assert-is-almost-same-value": "^0.1.1", - "@stdlib/random-array-discrete-uniform": "^0.2.2", - "@stdlib/random-array-uniform": "^0.2.2", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.3", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.3", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.3", - "@stdlib/utils-constructor-name": "^0.2.3", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.3", - "@stdlib/utils-keys": "^0.2.3", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.3" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..a8a7310 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index fea45a5..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.strictEqual( keys.length > 0, true, 'has keys' ); - t.end(); -}); From ecdecf7bcbf1d097d5f76854c8fee682b2c5e6f1 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 23 May 2026 03:21:56 +0000 Subject: [PATCH 197/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d1010f9..826b4bc 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.3", "@stdlib/strided-base-reinterpret-complex128": "^0.2.3", "@stdlib/strided-base-reinterpret-complex64": "^0.2.2", - "@stdlib/string-format": "^0.2.3", + "@stdlib/error-tools-fmtprodmsg": "^0.2.3", "@stdlib/utils-constructor-name": "^0.2.3", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.3", "@stdlib/utils-keys": "^0.2.3", From f6172e65b8d2c31f0b1f4f45e0a7ed2e01b807e4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 23 May 2026 03:23:15 +0000 Subject: [PATCH 198/208] Remove files --- index.d.ts | 820 --------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5667 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a066da6..0000000 --- a/index.d.ts +++ /dev/null @@ -1,820 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasAlmostEqualValues = require( '@stdlib/array-base-assert-has-almost-equal-values' ); -import hasAlmostSameValues = require( '@stdlib/array-base-assert-has-almost-same-values' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have respective elements which are approximately equal within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately equal - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostEqualValues( x, y, 0 ); - * // returns true - */ - hasAlmostEqualValues: typeof hasAlmostEqualValues; - - /** - * Tests if two arrays have respective elements which are approximately the same value within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately the same value - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostSameValues( x, y, 0 ); - * // returns true - */ - hasAlmostSameValues: typeof hasAlmostSameValues; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index f5f0593..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.3-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",v),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c765bf0..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;6mNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index a8a7310..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 47e11fb0bbfbe2822f5e0f189a430ae318768d39 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 23 May 2026 03:23:42 +0000 Subject: [PATCH 199/208] Auto-generated commit --- .editorconfig | 189 - .eslintrc.js | 1 - .gitattributes | 68 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 821 --- .github/workflows/publish.yml | 261 - .github/workflows/test.yml | 101 - .github/workflows/test_bundles.yml | 213 - .github/workflows/test_coverage.yml | 142 - .github/workflows/test_install.yml | 94 - .github/workflows/test_published_package.yml | 115 - .gitignore | 204 - .npmignore | 229 - .npmrc | 44 - CHANGELOG.md | 565 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 103 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 276 - package.json | 125 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 41 files changed, 4899 insertions(+), 4692 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 80f3fca..0000000 --- a/.editorconfig +++ /dev/null @@ -1,189 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Ignore generated lock files for GitHub Agentic Workflows: -[*.lock.yml] -charset = unset -end_of_line = unset -indent_style = unset -indent_size = unset -trim_trailing_whitespace = unset -insert_final_newline = unset - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 24b327f..0000000 --- a/.gitattributes +++ /dev/null @@ -1,68 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation - -.github/workflows/*.lock.yml linguist-generated=true merge=ours diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 8547f6c..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2026-05-23T03:20:38.583Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 83d50c4..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,821 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send notification to Zulip if job fails: - - name: 'Send notification to Zulip in case of failure' - # Pin action to full length commit SHA - uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2 - if: failure() - with: - api-key: ${{ secrets.ZULIP_API_KEY }} - email: 'github-actions-bot@stdlib.zulipchat.com' - organization-url: 'https://stdlib.zulipchat.com' - to: 'workflows-standalone' - type: 'stream' - topic: ${{ github.event.repository.name }} - content: | - :cross_mark: **${{ github.workflow }}** workflow failed - - **Repository:** [${{ github.repository }}](${{ github.server_url }}/${{ github.repository }}) - **Run:** [View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -213,7 +210,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -278,57 +275,57 @@ Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values +[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values/tree/esm -[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values +[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0143c67..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasAlmostEqualValues",require('@stdlib/array-base-assert-has-almost-equal-values/dist'));r(e,"hasAlmostSameValues",require('@stdlib/array-base-assert-has-almost-same-values/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 3c91d0d..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nsetReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nsetReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,uBAAwB,QAAS,mDAAoD,CAAE,EASxGD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..f5f0593 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.3-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",v),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c765bf0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;6mNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index f9c2c4b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,276 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasAlmostEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values} -*/ -setReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) ); - -/** -* @name hasAlmostSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-same-values} -*/ -setReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 826b4bc..ebd9b01 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.4.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,105 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.3", - "@stdlib/array-base-assert-has-almost-equal-values": "^0.1.1", - "@stdlib/array-base-assert-has-almost-same-values": "^0.1.1", - "@stdlib/array-base-assert-has-equal-values": "^0.1.1", - "@stdlib/array-base-assert-has-equal-values-indexed": "^0.1.1", - "@stdlib/array-base-assert-has-same-values": "^0.3.1", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.3", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.2", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.3", - "@stdlib/array-base-assert-is-byte-order": "^0.1.1", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.3", - "@stdlib/array-base-assert-is-complex128array": "^0.2.3", - "@stdlib/array-base-assert-is-complex64array": "^0.2.3", - "@stdlib/array-base-assert-is-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.3", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.3", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.3", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-sorted-ascending": "^0.1.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.3" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.3", - "@stdlib/array-base-accessor-getter": "^0.2.3", - "@stdlib/array-base-arraylike2object": "^0.2.2", - "@stdlib/array-base-getter": "^0.2.3", - "@stdlib/array-base-ones": "^0.2.3", - "@stdlib/array-base-zero-to": "^0.2.2", - "@stdlib/array-base-zeros": "^0.2.3", - "@stdlib/array-bool": "^0.1.2", - "@stdlib/array-byte-orders": "^0.1.1", - "@stdlib/array-cartesian-square": "^0.2.3", - "@stdlib/array-complex128": "^0.3.2", - "@stdlib/array-complex64": "^0.3.2", - "@stdlib/array-dtype": "^0.3.1", - "@stdlib/array-dtypes": "^0.4.1", - "@stdlib/array-float32": "^0.2.3", - "@stdlib/array-float64": "^0.2.3", - "@stdlib/array-int16": "^0.2.3", - "@stdlib/array-int32": "^0.2.3", - "@stdlib/array-int8": "^0.2.3", - "@stdlib/array-mostly-safe-casts": "^0.4.1", - "@stdlib/array-safe-casts": "^0.3.1", - "@stdlib/array-same-kind-casts": "^0.3.1", - "@stdlib/array-uint16": "^0.2.3", - "@stdlib/array-uint32": "^0.2.3", - "@stdlib/array-uint8": "^0.2.3", - "@stdlib/array-uint8c": "^0.2.3", - "@stdlib/assert-has-own-property": "^0.2.3", - "@stdlib/assert-is-almost-equal": "^0.1.1", - "@stdlib/assert-is-almost-same-value": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.2.3", - "@stdlib/assert-is-collection": "^0.2.3", - "@stdlib/assert-is-same-value": "^0.2.3", - "@stdlib/buffer-alloc-unsafe": "^0.2.3", - "@stdlib/constants-float32-eps": "^0.2.3", - "@stdlib/constants-float64-eps": "^0.2.3", - "@stdlib/math-base-special-pow": "^0.3.1", - "@stdlib/number-float32-base-assert-is-almost-equal": "^0.0.1", - "@stdlib/number-float32-base-assert-is-almost-same-value": "^0.1.1", - "@stdlib/number-float64-base-assert-is-almost-equal": "^0.0.1", - "@stdlib/number-float64-base-assert-is-almost-same-value": "^0.1.1", - "@stdlib/random-array-discrete-uniform": "^0.2.2", - "@stdlib/random-array-uniform": "^0.2.2", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.3", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.3", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.3", - "@stdlib/utils-constructor-name": "^0.2.3", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.3", - "@stdlib/utils-keys": "^0.2.3", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.3" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..a8a7310 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index fea45a5..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.strictEqual( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 070006142e86c670b5981eebce5c264fe8b54c3a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Jul 2026 03:20:30 +0000 Subject: [PATCH 200/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d1010f9..826b4bc 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.3", "@stdlib/strided-base-reinterpret-complex128": "^0.2.3", "@stdlib/strided-base-reinterpret-complex64": "^0.2.2", - "@stdlib/string-format": "^0.2.3", + "@stdlib/error-tools-fmtprodmsg": "^0.2.3", "@stdlib/utils-constructor-name": "^0.2.3", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.3", "@stdlib/utils-keys": "^0.2.3", From fa90b6e06f3178dd8d5f96c80de15b4edff60cd4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Jul 2026 03:23:26 +0000 Subject: [PATCH 201/208] Remove files --- index.d.ts | 820 --------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5667 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a066da6..0000000 --- a/index.d.ts +++ /dev/null @@ -1,820 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasAlmostEqualValues = require( '@stdlib/array-base-assert-has-almost-equal-values' ); -import hasAlmostSameValues = require( '@stdlib/array-base-assert-has-almost-same-values' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have respective elements which are approximately equal within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately equal - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostEqualValues( x, y, 0 ); - * // returns true - */ - hasAlmostEqualValues: typeof hasAlmostEqualValues; - - /** - * Tests if two arrays have respective elements which are approximately the same value within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately the same value - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostSameValues( x, y, 0 ); - * // returns true - */ - hasAlmostSameValues: typeof hasAlmostSameValues; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index f5f0593..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.3-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",v),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c765bf0..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;6mNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index a8a7310..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 7a8ab8f49b72c163f08a5c202dfacd80fb2b42fc Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Jul 2026 03:23:58 +0000 Subject: [PATCH 202/208] Auto-generated commit --- .editorconfig | 189 - .eslintrc.js | 1 - .gitattributes | 68 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 821 --- .github/workflows/publish.yml | 261 - .github/workflows/test.yml | 101 - .github/workflows/test_bundles.yml | 213 - .github/workflows/test_coverage.yml | 142 - .github/workflows/test_install.yml | 94 - .github/workflows/test_published_package.yml | 115 - .gitignore | 204 - .npmignore | 229 - .npmrc | 44 - CHANGELOG.md | 565 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 103 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 276 - package.json | 125 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 41 files changed, 4899 insertions(+), 4692 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 80f3fca..0000000 --- a/.editorconfig +++ /dev/null @@ -1,189 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Ignore generated lock files for GitHub Agentic Workflows: -[*.lock.yml] -charset = unset -end_of_line = unset -indent_style = unset -indent_size = unset -trim_trailing_whitespace = unset -insert_final_newline = unset - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 24b327f..0000000 --- a/.gitattributes +++ /dev/null @@ -1,68 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation - -.github/workflows/*.lock.yml linguist-generated=true merge=ours diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 1a398e5..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2026-07-03T03:18:38.456Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 83d50c4..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,821 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send notification to Zulip if job fails: - - name: 'Send notification to Zulip in case of failure' - # Pin action to full length commit SHA - uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2 - if: failure() - with: - api-key: ${{ secrets.ZULIP_API_KEY }} - email: 'github-actions-bot@stdlib.zulipchat.com' - organization-url: 'https://stdlib.zulipchat.com' - to: 'workflows-standalone' - type: 'stream' - topic: ${{ github.event.repository.name }} - content: | - :cross_mark: **${{ github.workflow }}** workflow failed - - **Repository:** [${{ github.repository }}](${{ github.server_url }}/${{ github.repository }}) - **Run:** [View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -213,7 +210,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -278,57 +275,57 @@ Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values +[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values/tree/esm -[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values +[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0143c67..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasAlmostEqualValues",require('@stdlib/array-base-assert-has-almost-equal-values/dist'));r(e,"hasAlmostSameValues",require('@stdlib/array-base-assert-has-almost-same-values/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 3c91d0d..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nsetReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nsetReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,uBAAwB,QAAS,mDAAoD,CAAE,EASxGD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..f5f0593 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.3-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",v),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c765bf0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;6mNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index f9c2c4b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,276 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasAlmostEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values} -*/ -setReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) ); - -/** -* @name hasAlmostSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-same-values} -*/ -setReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 826b4bc..ebd9b01 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.4.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,105 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.3", - "@stdlib/array-base-assert-has-almost-equal-values": "^0.1.1", - "@stdlib/array-base-assert-has-almost-same-values": "^0.1.1", - "@stdlib/array-base-assert-has-equal-values": "^0.1.1", - "@stdlib/array-base-assert-has-equal-values-indexed": "^0.1.1", - "@stdlib/array-base-assert-has-same-values": "^0.3.1", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.3", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.2", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.3", - "@stdlib/array-base-assert-is-byte-order": "^0.1.1", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.3", - "@stdlib/array-base-assert-is-complex128array": "^0.2.3", - "@stdlib/array-base-assert-is-complex64array": "^0.2.3", - "@stdlib/array-base-assert-is-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.3", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.3", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.3", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-sorted-ascending": "^0.1.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.3" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.3", - "@stdlib/array-base-accessor-getter": "^0.2.3", - "@stdlib/array-base-arraylike2object": "^0.2.2", - "@stdlib/array-base-getter": "^0.2.3", - "@stdlib/array-base-ones": "^0.2.3", - "@stdlib/array-base-zero-to": "^0.2.2", - "@stdlib/array-base-zeros": "^0.2.3", - "@stdlib/array-bool": "^0.1.2", - "@stdlib/array-byte-orders": "^0.1.1", - "@stdlib/array-cartesian-square": "^0.2.3", - "@stdlib/array-complex128": "^0.3.2", - "@stdlib/array-complex64": "^0.3.2", - "@stdlib/array-dtype": "^0.3.1", - "@stdlib/array-dtypes": "^0.4.1", - "@stdlib/array-float32": "^0.2.3", - "@stdlib/array-float64": "^0.2.3", - "@stdlib/array-int16": "^0.2.3", - "@stdlib/array-int32": "^0.2.3", - "@stdlib/array-int8": "^0.2.3", - "@stdlib/array-mostly-safe-casts": "^0.4.1", - "@stdlib/array-safe-casts": "^0.3.1", - "@stdlib/array-same-kind-casts": "^0.3.1", - "@stdlib/array-uint16": "^0.2.3", - "@stdlib/array-uint32": "^0.2.3", - "@stdlib/array-uint8": "^0.2.3", - "@stdlib/array-uint8c": "^0.2.3", - "@stdlib/assert-has-own-property": "^0.2.3", - "@stdlib/assert-is-almost-equal": "^0.1.1", - "@stdlib/assert-is-almost-same-value": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.2.3", - "@stdlib/assert-is-collection": "^0.2.3", - "@stdlib/assert-is-same-value": "^0.2.3", - "@stdlib/buffer-alloc-unsafe": "^0.2.3", - "@stdlib/constants-float32-eps": "^0.2.3", - "@stdlib/constants-float64-eps": "^0.2.3", - "@stdlib/math-base-special-pow": "^0.3.1", - "@stdlib/number-float32-base-assert-is-almost-equal": "^0.0.1", - "@stdlib/number-float32-base-assert-is-almost-same-value": "^0.1.1", - "@stdlib/number-float64-base-assert-is-almost-equal": "^0.0.1", - "@stdlib/number-float64-base-assert-is-almost-same-value": "^0.1.1", - "@stdlib/random-array-discrete-uniform": "^0.2.2", - "@stdlib/random-array-uniform": "^0.2.2", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.3", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.3", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.3", - "@stdlib/utils-constructor-name": "^0.2.3", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.3", - "@stdlib/utils-keys": "^0.2.3", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.3" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..a8a7310 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index fea45a5..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.strictEqual( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 15879581d69785958ae0255b9ed721bb0e2bb286 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 4 Jul 2026 06:10:29 +0000 Subject: [PATCH 203/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d68f0f2..cee97b0 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.3", "@stdlib/strided-base-reinterpret-complex128": "^0.2.3", "@stdlib/strided-base-reinterpret-complex64": "^0.2.2", - "@stdlib/string-format": "^0.2.3", + "@stdlib/error-tools-fmtprodmsg": "^0.2.3", "@stdlib/utils-constructor-name": "^0.2.3", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.3", "@stdlib/utils-keys": "^0.2.3", From 81c922d086b87e5b642b0eae3142d4d3da9de84c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 4 Jul 2026 06:12:52 +0000 Subject: [PATCH 204/208] Remove files --- index.d.ts | 820 --------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5667 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a066da6..0000000 --- a/index.d.ts +++ /dev/null @@ -1,820 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasAlmostEqualValues = require( '@stdlib/array-base-assert-has-almost-equal-values' ); -import hasAlmostSameValues = require( '@stdlib/array-base-assert-has-almost-same-values' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have respective elements which are approximately equal within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately equal - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostEqualValues( x, y, 0 ); - * // returns true - */ - hasAlmostEqualValues: typeof hasAlmostEqualValues; - - /** - * Tests if two arrays have respective elements which are approximately the same value within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately the same value - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostSameValues( x, y, 0 ); - * // returns true - */ - hasAlmostSameValues: typeof hasAlmostSameValues; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index f5f0593..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.3-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",v),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c765bf0..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;6mNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index a8a7310..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From b114f068560375fd31032e9943ab6318d8920fc9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 4 Jul 2026 06:13:27 +0000 Subject: [PATCH 205/208] Auto-generated commit --- .editorconfig | 189 - .eslintrc.js | 1 - .gitattributes | 68 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 821 --- .github/workflows/publish.yml | 261 - .github/workflows/test.yml | 101 - .github/workflows/test_bundles.yml | 213 - .github/workflows/test_coverage.yml | 142 - .github/workflows/test_install.yml | 94 - .github/workflows/test_published_package.yml | 115 - .gitignore | 204 - .npmignore | 229 - .npmrc | 44 - CHANGELOG.md | 586 --- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 103 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 276 - package.json | 126 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4899 insertions(+), 4713 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 80f3fca..0000000 --- a/.editorconfig +++ /dev/null @@ -1,189 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Ignore generated lock files for GitHub Agentic Workflows: -[*.lock.yml] -charset = unset -end_of_line = unset -indent_style = unset -indent_size = unset -trim_trailing_whitespace = unset -insert_final_newline = unset - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 24b327f..0000000 --- a/.gitattributes +++ /dev/null @@ -1,68 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation - -.github/workflows/*.lock.yml linguist-generated=true merge=ours diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 83d50c4..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,821 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send notification to Zulip if job fails: - - name: 'Send notification to Zulip in case of failure' - # Pin action to full length commit SHA - uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2 - if: failure() - with: - api-key: ${{ secrets.ZULIP_API_KEY }} - email: 'github-actions-bot@stdlib.zulipchat.com' - organization-url: 'https://stdlib.zulipchat.com' - to: 'workflows-standalone' - type: 'stream' - topic: ${{ github.event.repository.name }} - content: | - :cross_mark: **${{ github.workflow }}** workflow failed - - **Repository:** [${{ github.repository }}](${{ github.server_url }}/${{ github.repository }}) - **Run:** [View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -213,7 +210,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -278,57 +275,57 @@ Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values +[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values/tree/esm -[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values +[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0143c67..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasAlmostEqualValues",require('@stdlib/array-base-assert-has-almost-equal-values/dist'));r(e,"hasAlmostSameValues",require('@stdlib/array-base-assert-has-almost-same-values/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 3c91d0d..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nsetReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nsetReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,uBAAwB,QAAS,mDAAoD,CAAE,EASxGD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..f5f0593 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.3-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",v),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c765bf0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;6mNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index f9c2c4b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,276 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasAlmostEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values} -*/ -setReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) ); - -/** -* @name hasAlmostSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-same-values} -*/ -setReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index cee97b0..ebd9b01 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.4.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,106 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.3", - "@stdlib/array-base-assert-has-almost-equal-values": "^0.1.1", - "@stdlib/array-base-assert-has-almost-same-values": "^0.1.1", - "@stdlib/array-base-assert-has-equal-values": "^0.1.1", - "@stdlib/array-base-assert-has-equal-values-indexed": "^0.1.1", - "@stdlib/array-base-assert-has-same-values": "^0.3.1", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.3", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.2", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.3", - "@stdlib/array-base-assert-is-byte-order": "^0.1.1", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.3", - "@stdlib/array-base-assert-is-complex128array": "^0.2.3", - "@stdlib/array-base-assert-is-complex64array": "^0.2.3", - "@stdlib/array-base-assert-is-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.3", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.3", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.3", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-sorted-ascending": "^0.1.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.3" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.3", - "@stdlib/array-base-accessor-getter": "^0.2.3", - "@stdlib/array-base-arraylike2object": "^0.2.2", - "@stdlib/array-base-getter": "^0.2.3", - "@stdlib/array-base-ones": "^0.2.3", - "@stdlib/array-base-zero-to": "^0.2.2", - "@stdlib/array-base-zeros": "^0.2.3", - "@stdlib/array-bool": "^0.1.2", - "@stdlib/array-byte-orders": "^0.1.1", - "@stdlib/array-cartesian-square": "^0.2.3", - "@stdlib/array-complex128": "^0.3.2", - "@stdlib/array-complex64": "^0.3.2", - "@stdlib/array-dtype": "^0.3.1", - "@stdlib/array-dtypes": "^0.4.1", - "@stdlib/array-float16": "github:stdlib-js/array-float16#main", - "@stdlib/array-float32": "^0.2.3", - "@stdlib/array-float64": "^0.2.3", - "@stdlib/array-int16": "^0.2.3", - "@stdlib/array-int32": "^0.2.3", - "@stdlib/array-int8": "^0.2.3", - "@stdlib/array-mostly-safe-casts": "^0.4.1", - "@stdlib/array-safe-casts": "^0.3.1", - "@stdlib/array-same-kind-casts": "^0.3.1", - "@stdlib/array-uint16": "^0.2.3", - "@stdlib/array-uint32": "^0.2.3", - "@stdlib/array-uint8": "^0.2.3", - "@stdlib/array-uint8c": "^0.2.3", - "@stdlib/assert-has-own-property": "^0.2.3", - "@stdlib/assert-is-almost-equal": "^0.1.1", - "@stdlib/assert-is-almost-same-value": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.2.3", - "@stdlib/assert-is-collection": "^0.2.3", - "@stdlib/assert-is-same-value": "^0.2.3", - "@stdlib/buffer-alloc-unsafe": "^0.2.3", - "@stdlib/constants-float32-eps": "^0.2.3", - "@stdlib/constants-float64-eps": "^0.2.3", - "@stdlib/math-base-special-pow": "^0.3.1", - "@stdlib/number-float32-base-assert-is-almost-equal": "^0.0.1", - "@stdlib/number-float32-base-assert-is-almost-same-value": "^0.1.1", - "@stdlib/number-float64-base-assert-is-almost-equal": "^0.0.1", - "@stdlib/number-float64-base-assert-is-almost-same-value": "^0.1.1", - "@stdlib/random-array-discrete-uniform": "^0.2.2", - "@stdlib/random-array-uniform": "^0.2.2", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.3", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.3", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.3", - "@stdlib/utils-constructor-name": "^0.2.3", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.3", - "@stdlib/utils-keys": "^0.2.3", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.3" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..a8a7310 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index fea45a5..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.strictEqual( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 9b2b1b7ecaf1db2a4538c42542747cc699ad72a0 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 21 Aug 2026 03:41:03 +0000 Subject: [PATCH 206/208] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d68f0f2..cee97b0 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "@stdlib/strided-base-reinterpret-boolean": "^0.0.3", "@stdlib/strided-base-reinterpret-complex128": "^0.2.3", "@stdlib/strided-base-reinterpret-complex64": "^0.2.2", - "@stdlib/string-format": "^0.2.3", + "@stdlib/error-tools-fmtprodmsg": "^0.2.3", "@stdlib/utils-constructor-name": "^0.2.3", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.3", "@stdlib/utils-keys": "^0.2.3", From dd786348fd7b8df46ea3b6b37aec28b1c058f2fc Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 21 Aug 2026 03:51:19 +0000 Subject: [PATCH 207/208] Remove files --- index.d.ts | 829 --------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5676 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index cfd1d5c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,829 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import contains = require( '@stdlib/array-base-assert-contains' ); -import hasAlmostEqualValues = require( '@stdlib/array-base-assert-has-almost-equal-values' ); -import hasAlmostSameValues = require( '@stdlib/array-base-assert-has-almost-same-values' ); -import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ); -import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ); -import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ); -import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' ); -import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' ); -import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' ); -import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' ); -import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ); -import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' ); -import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' ); -import isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' ); -import isDataType = require( '@stdlib/array-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/array-base-assert-is-floating-point-data-type' ); -import isIntegerDataType = require( '@stdlib/array-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/array-base-assert-is-numeric-data-type' ); -import isRealDataType = require( '@stdlib/array-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ); -import isSafeDataTypeCast = require( '@stdlib/array-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/array-base-assert-is-signed-integer-data-type' ); -import isSortedAscending = require( '@stdlib/array-base-assert-is-sorted-ascending' ); -import isUnsignedIntegerDataType = require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests if an array contains a provided search value. - * - * @param x - input array - * @param value - search value - * @returns boolean indicating if an array contains a search value - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var out = ns.contains( x, 2 ); - * // returns true - * - * @example - * var x = [ 1, 2, 3 ]; - * - * var fcn = ns.contains.factory( x ); - * // returns - * - * var out = fcn( 2 ); - * // returns true - */ - contains: typeof contains; - - /** - * Tests if two arrays have respective elements which are approximately equal within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately equal - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostEqualValues( x, y, 0 ); - * // returns true - */ - hasAlmostEqualValues: typeof hasAlmostEqualValues; - - /** - * Tests if two arrays have respective elements which are approximately the same value within a specified number of ULPs (units in the last place). - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @param maxULP - maximum allowed ULP difference - * @returns boolean indicating whether both arrays are approximately the same value - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasAlmostSameValues( x, y, 0 ); - * // returns true - */ - hasAlmostSameValues: typeof hasAlmostSameValues; - - /** - * Tests if two arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValues( x, y ); - * // returns true - */ - hasEqualValues: typeof hasEqualValues; - - /** - * Tests if two indexed arrays have equal values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have equal values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasEqualValuesIndexed( x, y ); - * // returns true - */ - hasEqualValuesIndexed: typeof hasEqualValuesIndexed; - - /** - * Tests if two arrays have the same values. - * - * ## Notes - * - * - If provided arrays of unequal length, the function returns `false`. - * - * @param x - first input array - * @param y - second input array - * @returns boolean indicating whether both arrays have the same values - * - * @example - * var x = [ 0, 0, 1, 0 ]; - * var y = [ 0, 0, 1, 0 ]; - * - * var out = ns.hasSameValues( x, y ); - * // returns true - */ - hasSameValues: typeof hasSameValues; - - /** - * Tests if an array-like object supports the accessor (get/set) protocol. - * - * @param value - value to test - * @returns boolean indicating whether a value is an accessor array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isAccessorArray( arr ); - * // returns true - * - * @example - * var bool = ns.isAccessorArray( [] ); - * // returns false - */ - isAccessorArray: typeof isAccessorArray; - - /** - * Tests whether an input value is a supported array boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'complex64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'complex128' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Tests if a value is a `BooleanArray`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `BooleanArray` - * - * @example - * var BooleanArray = require( '@stdlib/array-bool' ); - * - * var arr = new BooleanArray( 10 ); - * var bool = ns.isBooleanArray( arr ); - * // returns true - * - * @example - * var bool = ns.isBooleanArray( [] ); - * // returns false - */ - isBooleanArray: typeof isBooleanArray; - - /** - * Tests whether an input value is a supported array byte order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array byte order - * - * @example - * var bool = ns.isByteOrder( 'little-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'big-endian' ); - * // returns true - * - * bool = ns.isByteOrder( 'foo' ); - * // returns false - */ - isByteOrder: typeof isByteOrder; - - /** - * Tests whether an input value is a supported array complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Tests if a value is a complex typed array. - * - * @param value - value to test - * @returns boolean indicating whether a value is complex typed array - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplexTypedArray( arr ); - * // returns true - * - * @example - * var bool = ns.isComplexTypedArray( [] ); - * // returns false - */ - isComplexTypedArray: typeof isComplexTypedArray; - - /** - * Tests if a value is a `Complex64Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex64Array` - * - * @example - * var Complex64Array = require( '@stdlib/array-complex64' ); - * - * var arr = new Complex64Array( 10 ); - * var bool = ns.isComplex64Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex64Array( [] ); - * // returns false - */ - isComplex64Array: typeof isComplex64Array; - - /** - * Tests if a value is a `Complex128Array`. - * - * @param value - value to test - * @returns boolean indicating whether a value is a `Complex128Array` - * - * @example - * var Complex128Array = require( '@stdlib/array-complex128' ); - * - * var arr = new Complex128Array( 10 ); - * var bool = ns.isComplex128Array( arr ); - * // returns true - * - * @example - * var bool = ns.isComplex128Array( [] ); - * // returns false - */ - isComplex128Array: typeof isComplex128Array; - - /** - * Tests whether an input value is a supported array data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array data type - * - * @example - * var bool = ns.isDataType( 'float16' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported array floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'float16' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported array integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast or, for floating-point data types, downcast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported array numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is a supported array real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported array real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. - * - * @param from - array data type - * @param to - array data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported array signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Tests if an array is sorted in ascending order. - * - * @param x - input array - * @returns boolean indicating if an array is sorted in ascending order - * - * @example - * var out = ns.isSortedAscending( [ 1, 2, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3, 2, 1 ] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 3, 3, 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [ 3 ] ); - * // returns true - * - * @example - * var out = ns.isSortedAscending( [] ); - * // returns false - * - * @example - * var out = ns.isSortedAscending( [ 1, 3, 2 ] ); - * // returns false - */ - isSortedAscending: typeof isSortedAscending; - - /** - * Tests whether an input value is a supported array unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported array unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base array assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index f5f0593..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.3-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",v),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c765bf0..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;6mNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index a8a7310..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 878d4ac365a69bbde8a0897bfeffebc193fc736a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 21 Aug 2026 03:51:52 +0000 Subject: [PATCH 208/208] Auto-generated commit --- .editorconfig | 189 - .eslintrc.js | 1 - .gitattributes | 68 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 821 --- .github/workflows/publish.yml | 261 - .github/workflows/test.yml | 101 - .github/workflows/test_bundles.yml | 213 - .github/workflows/test_coverage.yml | 142 - .github/workflows/test_install.yml | 94 - .github/workflows/test_published_package.yml | 115 - .gitignore | 205 - .npmignore | 229 - .npmrc | 44 - CHANGELOG.md | 587 --- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 103 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 88 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 276 - package.json | 126 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 41 files changed, 4899 insertions(+), 4716 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 80f3fca..0000000 --- a/.editorconfig +++ /dev/null @@ -1,189 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Ignore generated lock files for GitHub Agentic Workflows: -[*.lock.yml] -charset = unset -end_of_line = unset -indent_style = unset -indent_size = unset -trim_trailing_whitespace = unset -insert_final_newline = unset - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 24b327f..0000000 --- a/.gitattributes +++ /dev/null @@ -1,68 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation - -.github/workflows/*.lock.yml linguist-generated=true merge=ours diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 51a97f4..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2026-08-21T03:37:24.772Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b473364..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 4ca846e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 511afd9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '30 6 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 83d50c4..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,821 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send notification to Zulip if job fails: - - name: 'Send notification to Zulip in case of failure' - # Pin action to full length commit SHA - uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2 - if: failure() - with: - api-key: ${{ secrets.ZULIP_API_KEY }} - email: 'github-actions-bot@stdlib.zulipchat.com' - organization-url: 'https://stdlib.zulipchat.com' - to: 'workflows-standalone' - type: 'stream' - topic: ${{ github.event.repository.name }} - content: | - :cross_mark: **${{ github.workflow }}** workflow failed - - **Repository:** [${{ github.repository }}](${{ github.server_url }}/${{ github.repository }}) - **Run:** [View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -213,7 +210,7 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -278,57 +275,57 @@ Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors]. -[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains +[@stdlib/array/base/assert/contains]: https://github.com/stdlib-js/array-base-assert-contains/tree/esm -[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values +[@stdlib/array/base/assert/has-almost-equal-values]: https://github.com/stdlib-js/array-base-assert-has-almost-equal-values/tree/esm -[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values +[@stdlib/array/base/assert/has-almost-same-values]: https://github.com/stdlib-js/array-base-assert-has-almost-same-values/tree/esm -[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed +[@stdlib/array/base/assert/has-equal-values-indexed]: https://github.com/stdlib-js/array-base-assert-has-equal-values-indexed/tree/esm -[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values +[@stdlib/array/base/assert/has-equal-values]: https://github.com/stdlib-js/array-base-assert-has-equal-values/tree/esm -[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values +[@stdlib/array/base/assert/has-same-values]: https://github.com/stdlib-js/array-base-assert-has-same-values/tree/esm -[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array +[@stdlib/array/base/assert/is-accessor-array]: https://github.com/stdlib-js/array-base-assert-is-accessor-array/tree/esm -[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type +[@stdlib/array/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/array-base-assert-is-boolean-data-type/tree/esm -[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray +[@stdlib/array/base/assert/is-booleanarray]: https://github.com/stdlib-js/array-base-assert-is-booleanarray/tree/esm -[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order +[@stdlib/array/base/assert/is-byte-order]: https://github.com/stdlib-js/array-base-assert-is-byte-order/tree/esm -[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type +[@stdlib/array/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array +[@stdlib/array/base/assert/is-complex-typed-array]: https://github.com/stdlib-js/array-base-assert-is-complex-typed-array/tree/esm -[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array +[@stdlib/array/base/assert/is-complex128array]: https://github.com/stdlib-js/array-base-assert-is-complex128array/tree/esm -[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array +[@stdlib/array/base/assert/is-complex64array]: https://github.com/stdlib-js/array-base-assert-is-complex64array/tree/esm -[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type +[@stdlib/array/base/assert/is-data-type]: https://github.com/stdlib-js/array-base-assert-is-data-type/tree/esm -[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type +[@stdlib/array/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type +[@stdlib/array/base/assert/is-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast +[@stdlib/array/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type +[@stdlib/array/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/array-base-assert-is-numeric-data-type/tree/esm -[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type +[@stdlib/array/base/assert/is-real-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-data-type/tree/esm -[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type +[@stdlib/array/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/array-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast +[@stdlib/array/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast +[@stdlib/array/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/array-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type +[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending +[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/array-base-assert-is-sorted-ascending/tree/esm -[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type +[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/array-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 530b321..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert" -%% click B href "https://github.com/stdlib-js/array-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/array-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/array-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/array-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/array-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert -[production-url]: https://github.com/stdlib-js/array-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/array-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/array-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/array-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/array-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/array-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/array-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0143c67..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"contains",require('@stdlib/array-base-assert-contains/dist'));r(e,"hasAlmostEqualValues",require('@stdlib/array-base-assert-has-almost-equal-values/dist'));r(e,"hasAlmostSameValues",require('@stdlib/array-base-assert-has-almost-same-values/dist'));r(e,"hasEqualValues",require('@stdlib/array-base-assert-has-equal-values/dist'));r(e,"hasEqualValuesIndexed",require('@stdlib/array-base-assert-has-equal-values-indexed/dist'));r(e,"hasSameValues",require('@stdlib/array-base-assert-has-same-values/dist'));r(e,"isAccessorArray",require('@stdlib/array-base-assert-is-accessor-array/dist'));r(e,"isBooleanDataType",require('@stdlib/array-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanArray",require('@stdlib/array-base-assert-is-booleanarray/dist'));r(e,"isByteOrder",require('@stdlib/array-base-assert-is-byte-order/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/array-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isComplexTypedArray",require('@stdlib/array-base-assert-is-complex-typed-array/dist'));r(e,"isComplex64Array",require('@stdlib/array-base-assert-is-complex64array/dist'));r(e,"isComplex128Array",require('@stdlib/array-base-assert-is-complex128array/dist'));r(e,"isDataType",require('@stdlib/array-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/array-base-assert-is-floating-point-data-type/dist'));r(e,"isIntegerDataType",require('@stdlib/array-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/array-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/array-base-assert-is-numeric-data-type/dist'));r(e,"isRealDataType",require('@stdlib/array-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/array-base-assert-is-real-floating-point-data-type/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/array-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/array-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/array-base-assert-is-signed-integer-data-type/dist'));r(e,"isSortedAscending",require('@stdlib/array-base-assert-is-sorted-ascending/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/array-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 3c91d0d..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nsetReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nsetReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nsetReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nsetReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nsetReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nsetReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nsetReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nsetReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nsetReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nsetReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nsetReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,WAAY,QAAS,oCAAqC,CAAE,EAS7ED,EAAaC,EAAI,uBAAwB,QAAS,mDAAoD,CAAE,EASxGD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,iBAAkB,QAAS,4CAA6C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,oDAAqD,CAAE,EAS1GD,EAAaC,EAAI,gBAAiB,QAAS,2CAA4C,CAAE,EASzFD,EAAaC,EAAI,kBAAmB,QAAS,6CAA8C,CAAE,EAS7FD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,2CAA4C,CAAE,EAS1FD,EAAaC,EAAI,cAAe,QAAS,yCAA0C,CAAE,EASrFD,EAAaC,EAAI,iCAAkC,QAAS,+DAAgE,CAAE,EAS9HD,EAAaC,EAAI,sBAAuB,QAAS,kDAAmD,CAAE,EAStGD,EAAaC,EAAI,mBAAoB,QAAS,6CAA8C,CAAE,EAS9FD,EAAaC,EAAI,oBAAqB,QAAS,8CAA+C,CAAE,EAShGD,EAAaC,EAAI,aAAc,QAAS,wCAAyC,CAAE,EASnFD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,oBAAqB,QAAS,gDAAiD,CAAE,EASlGD,EAAaC,EAAI,iBAAkB,QAAS,6CAA8C,CAAE,EAS5FD,EAAaC,EAAI,8BAA+B,QAAS,4DAA6D,CAAE,EASxHD,EAAaC,EAAI,qBAAsB,QAAS,kDAAmD,CAAE,EASrGD,EAAaC,EAAI,yBAA0B,QAAS,uDAAwD,CAAE,EAS9GD,EAAaC,EAAI,0BAA2B,QAAS,uDAAwD,CAAE,EAS/GD,EAAaC,EAAI,oBAAqB,QAAS,+CAAgD,CAAE,EASjGD,EAAaC,EAAI,4BAA6B,QAAS,yDAA0D,CAAE,EAKnH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index e344b79..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index b4de83f..0000000 --- a/examples/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var dtype = require( '@stdlib/array-dtype' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var ns = require( './../lib' ); - -// Create various arrays: -var arr1 = new Float64Array( [ 1.1, 2.2, 3.3 ] ); -var arr2 = new Int32Array( [ 1, 2, 3 ] ); -var arr3 = new Uint8Array( [ 1, 2, 3 ] ); -var arr4 = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0 ] ); // two complex numbers: 1+1i, 2+2i - -// Get data types: -var dt1 = dtype( arr1 ); -var dt2 = dtype( arr2 ); -var dt3 = dtype( arr3 ); -var dt4 = dtype( arr4 ); - -// Check data types: -console.log( dt1 + ' is floating-point data type: ' + ns.isFloatingPointDataType( dt1 ) ); -// => 'float64 is floating-point data type: true' - -console.log( dt2 + ' is integer data type: ' + ns.isIntegerDataType( dt2 ) ); -// => 'int32 is integer data type: true' - -console.log( dt3 + ' is unsigned integer data type: ' + ns.isUnsignedIntegerDataType( dt3 ) ); -// => 'uint8 is unsigned integer data type: true' - -console.log( dt4 + ' is complex floating-point data type: ' + ns.isComplexFloatingPointDataType( dt4 ) ); -// => 'complex128 is complex floating-point data type: true' - -// Check if arrays have the same values: -console.log( 'arr2 and arr3 have same values: ' + ns.hasSameValues( arr2, arr3 ) ); -// => 'arr2 and arr3 have same values: true' - -console.log( 'arr1 and arr2 have same values: ' + ns.hasSameValues( arr1, arr2 ) ); -// => 'arr1 and arr2 have same values: false' - -// Check safe data type casts: -console.log( 'Can safely cast from ' + dt2 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt2, dt1 ) ); -// => 'Can safely cast from int32 to float64: true' - -console.log( 'Can safely cast from ' + dt1 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt1, dt2 ) ); -// => 'Can safely cast from float64 to int32: false' - -console.log( 'Can safely cast from ' + dt3 + ' to ' + dt2 + ': ' + ns.isSafeDataTypeCast( dt3, dt2 ) ); -// => 'Can safely cast from uint8 to int32: true' - -console.log( 'Can safely cast from ' + dt4 + ' to ' + dt1 + ': ' + ns.isSafeDataTypeCast( dt4, dt1 ) ); -// => 'Can safely cast from complex128 to float64: false' - -// Check if arrays contain specific values: -console.log( 'arr1 contains 2.2: ' + ns.contains( arr1, 2.2 ) ); -// => 'arr1 contains 2.2: true' - -console.log( 'arr2 contains 2: ' + ns.contains( arr2, 2 ) ); -// => 'arr2 contains 2: true' - -console.log( 'arr2 contains 2.2: ' + ns.contains( arr2, 2.2 ) ); -// => 'arr2 contains 2.2: false' - -// Check complex array types: -console.log( 'arr4 is Complex128Array: ' + ns.isComplex128Array( arr4 ) ); -// => 'arr4 is Complex128Array: true' - -console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) ); -// => 'arr4 is complex typed array: true' diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..f5f0593 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.3-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";export{default as contains}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-contains@v0.2.3-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";export{default as hasAlmostEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-equal-values@v0.1.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";export{default as hasAlmostSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-almost-same-values@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";export{default as hasEqualValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";export{default as hasEqualValuesIndexed}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-equal-values-indexed@v0.1.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";export{default as hasSameValues}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-has-same-values@v0.3.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";export{default as isAccessorArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-accessor-array@v0.2.3-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-boolean-data-type@v0.0.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";export{default as isBooleanArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-booleanarray@v0.0.3-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";export{default as isByteOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-byte-order@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";export{default as isComplexTypedArray}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex-typed-array@v0.1.3-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";export{default as isComplex64Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex64array@v0.2.3-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";export{default as isComplex128Array}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-complex128array@v0.2.3-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-mostly-safe-data-type-cast@v0.2.3-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-safe-data-type-cast@v0.3.3-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-same-kind-data-type-cast@v0.3.3-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";export{default as isSortedAscending}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-sorted-ascending@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/array-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var q={};s(q,"contains",e),s(q,"hasAlmostEqualValues",a),s(q,"hasAlmostSameValues",t),s(q,"hasEqualValues",r),s(q,"hasEqualValuesIndexed",i),s(q,"hasSameValues",d),s(q,"isAccessorArray",n),s(q,"isBooleanDataType",m),s(q,"isBooleanArray",l),s(q,"isByteOrder",o),s(q,"isComplexFloatingPointDataType",p),s(q,"isComplexTypedArray",j),s(q,"isComplex64Array",y),s(q,"isComplex128Array",h),s(q,"isDataType",v),s(q,"isFloatingPointDataType",b),s(q,"isIntegerDataType",x),s(q,"isMostlySafeDataTypeCast",f),s(q,"isNumericDataType",g),s(q,"isRealDataType",c),s(q,"isRealFloatingPointDataType",u),s(q,"isSafeDataTypeCast",T),s(q,"isSameKindDataTypeCast",D),s(q,"isSignedIntegerDataType",A),s(q,"isSortedAscending",C),s(q,"isUnsignedIntegerDataType",S);export{q as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c765bf0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../lib/index.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nimport contains from '@stdlib/array-base-assert-contains';\nsetReadOnly( ns, 'contains', contains );\n\n/**\n* @name hasAlmostEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values}\n*/\nimport hasAlmostEqualValues from '@stdlib/array-base-assert-has-almost-equal-values';\nsetReadOnly( ns, 'hasAlmostEqualValues', hasAlmostEqualValues );\n\n/**\n* @name hasAlmostSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-almost-same-values}\n*/\nimport hasAlmostSameValues from '@stdlib/array-base-assert-has-almost-same-values';\nsetReadOnly( ns, 'hasAlmostSameValues', hasAlmostSameValues );\n\n/**\n* @name hasEqualValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values}\n*/\nimport hasEqualValues from '@stdlib/array-base-assert-has-equal-values';\nsetReadOnly( ns, 'hasEqualValues', hasEqualValues );\n\n/**\n* @name hasEqualValuesIndexed\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed}\n*/\nimport hasEqualValuesIndexed from '@stdlib/array-base-assert-has-equal-values-indexed';\nsetReadOnly( ns, 'hasEqualValuesIndexed', hasEqualValuesIndexed );\n\n/**\n* @name hasSameValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/has-same-values}\n*/\nimport hasSameValues from '@stdlib/array-base-assert-has-same-values';\nsetReadOnly( ns, 'hasSameValues', hasSameValues );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nsetReadOnly( ns, 'isAccessorArray', isAccessorArray );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-booleanarray}\n*/\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nsetReadOnly( ns, 'isBooleanArray', isBooleanArray );\n\n/**\n* @name isByteOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-byte-order}\n*/\nimport isByteOrder from '@stdlib/array-base-assert-is-byte-order';\nsetReadOnly( ns, 'isByteOrder', isByteOrder );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isComplexTypedArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array}\n*/\nimport isComplexTypedArray from '@stdlib/array-base-assert-is-complex-typed-array';\nsetReadOnly( ns, 'isComplexTypedArray', isComplexTypedArray );\n\n/**\n* @name isComplex64Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex64array}\n*/\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nsetReadOnly( ns, 'isComplex64Array', isComplex64Array );\n\n/**\n* @name isComplex128Array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-complex128array}\n*/\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nsetReadOnly( ns, 'isComplex128Array', isComplex128Array );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/array-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/array-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/array-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/array-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/array-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/array-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/array-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/array-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/array-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/array-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSortedAscending\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending}\n*/\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nsetReadOnly( ns, 'isSortedAscending', isSortedAscending );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/array-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","contains","hasAlmostEqualValues","hasAlmostSameValues","hasEqualValues","hasEqualValuesIndexed","hasSameValues","isAccessorArray","isBooleanDataType","isBooleanArray","isByteOrder","isComplexFloatingPointDataType","isComplexTypedArray","isComplex64Array","isComplex128Array","isDataType","isFloatingPointDataType","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isRealDataType","isRealFloatingPointDataType","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSortedAscending","isUnsignedIntegerDataType"],"mappings":";;6mNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,WAAAE,GAUAD,EAAAD,EAAA,uBAAAG,GAUAF,EAAAD,EAAA,sBAAAI,GAUAH,EAAAD,EAAA,iBAAAK,GAUAJ,EAAAD,EAAA,wBAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,kBAAAQ,GAUAP,EAAAD,EAAA,oBAAAS,GAUAR,EAAAD,EAAA,iBAAAU,GAUAT,EAAAD,EAAA,cAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,sBAAAa,GAUAZ,EAAAD,EAAA,mBAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,0BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,2BAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,qBAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,0BAAAyB,GAUAxB,EAAAD,EAAA,oBAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index f9c2c4b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,276 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name contains -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/contains} -*/ -setReadOnly( ns, 'contains', require( '@stdlib/array-base-assert-contains' ) ); - -/** -* @name hasAlmostEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-equal-values} -*/ -setReadOnly( ns, 'hasAlmostEqualValues', require( '@stdlib/array-base-assert-has-almost-equal-values' ) ); - -/** -* @name hasAlmostSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-almost-same-values} -*/ -setReadOnly( ns, 'hasAlmostSameValues', require( '@stdlib/array-base-assert-has-almost-same-values' ) ); - -/** -* @name hasEqualValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values} -*/ -setReadOnly( ns, 'hasEqualValues', require( '@stdlib/array-base-assert-has-equal-values' ) ); - -/** -* @name hasEqualValuesIndexed -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-equal-values-indexed} -*/ -setReadOnly( ns, 'hasEqualValuesIndexed', require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ); - -/** -* @name hasSameValues -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/has-same-values} -*/ -setReadOnly( ns, 'hasSameValues', require( '@stdlib/array-base-assert-has-same-values' ) ); - -/** -* @name isAccessorArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-accessor-array} -*/ -setReadOnly( ns, 'isAccessorArray', require( '@stdlib/array-base-assert-is-accessor-array' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/array-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-booleanarray} -*/ -setReadOnly( ns, 'isBooleanArray', require( '@stdlib/array-base-assert-is-booleanarray' ) ); - -/** -* @name isByteOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-byte-order} -*/ -setReadOnly( ns, 'isByteOrder', require( '@stdlib/array-base-assert-is-byte-order' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isComplexTypedArray -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex-typed-array} -*/ -setReadOnly( ns, 'isComplexTypedArray', require( '@stdlib/array-base-assert-is-complex-typed-array' ) ); - -/** -* @name isComplex64Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex64array} -*/ -setReadOnly( ns, 'isComplex64Array', require( '@stdlib/array-base-assert-is-complex64array' ) ); - -/** -* @name isComplex128Array -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-complex128array} -*/ -setReadOnly( ns, 'isComplex128Array', require( '@stdlib/array-base-assert-is-complex128array' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/array-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/array-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/array-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/array-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/array-base-assert-is-numeric-data-type' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/array-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/array-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/array-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/array-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/array-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSortedAscending -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-sorted-ascending} -*/ -setReadOnly( ns, 'isSortedAscending', require( '@stdlib/array-base-assert-is-sorted-ascending' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/array/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/array-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index cee97b0..ebd9b01 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.4.1", "description": "Base array assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,106 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-assert-contains": "^0.2.3", - "@stdlib/array-base-assert-has-almost-equal-values": "^0.1.1", - "@stdlib/array-base-assert-has-almost-same-values": "^0.1.1", - "@stdlib/array-base-assert-has-equal-values": "^0.1.1", - "@stdlib/array-base-assert-has-equal-values-indexed": "^0.1.1", - "@stdlib/array-base-assert-has-same-values": "^0.3.1", - "@stdlib/array-base-assert-is-accessor-array": "^0.2.3", - "@stdlib/array-base-assert-is-boolean-data-type": "^0.0.2", - "@stdlib/array-base-assert-is-booleanarray": "^0.0.3", - "@stdlib/array-base-assert-is-byte-order": "^0.1.1", - "@stdlib/array-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-complex-typed-array": "^0.1.3", - "@stdlib/array-base-assert-is-complex128array": "^0.2.3", - "@stdlib/array-base-assert-is-complex64array": "^0.2.3", - "@stdlib/array-base-assert-is-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-mostly-safe-data-type-cast": "^0.2.3", - "@stdlib/array-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-safe-data-type-cast": "^0.3.3", - "@stdlib/array-base-assert-is-same-kind-data-type-cast": "^0.3.3", - "@stdlib/array-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/array-base-assert-is-sorted-ascending": "^0.1.1", - "@stdlib/array-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.3" - }, - "devDependencies": { - "@stdlib/array-base-accessor": "^0.2.3", - "@stdlib/array-base-accessor-getter": "^0.2.3", - "@stdlib/array-base-arraylike2object": "^0.2.2", - "@stdlib/array-base-getter": "^0.2.3", - "@stdlib/array-base-ones": "^0.2.3", - "@stdlib/array-base-zero-to": "^0.2.2", - "@stdlib/array-base-zeros": "^0.2.3", - "@stdlib/array-bool": "^0.1.2", - "@stdlib/array-byte-orders": "^0.1.1", - "@stdlib/array-cartesian-square": "^0.2.3", - "@stdlib/array-complex128": "^0.3.2", - "@stdlib/array-complex64": "^0.3.2", - "@stdlib/array-dtype": "^0.3.1", - "@stdlib/array-dtypes": "^0.4.1", - "@stdlib/array-float16": "github:stdlib-js/array-float16#main", - "@stdlib/array-float32": "^0.2.3", - "@stdlib/array-float64": "^0.2.3", - "@stdlib/array-int16": "^0.2.3", - "@stdlib/array-int32": "^0.2.3", - "@stdlib/array-int8": "^0.2.3", - "@stdlib/array-mostly-safe-casts": "^0.4.1", - "@stdlib/array-safe-casts": "^0.3.1", - "@stdlib/array-same-kind-casts": "^0.3.1", - "@stdlib/array-uint16": "^0.2.3", - "@stdlib/array-uint32": "^0.2.3", - "@stdlib/array-uint8": "^0.2.3", - "@stdlib/array-uint8c": "^0.2.3", - "@stdlib/assert-has-own-property": "^0.2.3", - "@stdlib/assert-is-almost-equal": "^0.1.1", - "@stdlib/assert-is-almost-same-value": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.2.3", - "@stdlib/assert-is-collection": "^0.2.3", - "@stdlib/assert-is-same-value": "^0.2.3", - "@stdlib/buffer-alloc-unsafe": "^0.2.3", - "@stdlib/constants-float32-eps": "^0.2.3", - "@stdlib/constants-float64-eps": "^0.2.3", - "@stdlib/math-base-special-pow": "^0.3.1", - "@stdlib/number-float32-base-assert-is-almost-equal": "^0.0.1", - "@stdlib/number-float32-base-assert-is-almost-same-value": "^0.1.1", - "@stdlib/number-float64-base-assert-is-almost-equal": "^0.0.1", - "@stdlib/number-float64-base-assert-is-almost-same-value": "^0.1.1", - "@stdlib/random-array-discrete-uniform": "^0.2.2", - "@stdlib/random-array-uniform": "^0.2.2", - "@stdlib/strided-base-reinterpret-boolean": "^0.0.3", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.3", - "@stdlib/strided-base-reinterpret-complex64": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.3", - "@stdlib/utils-constructor-name": "^0.2.3", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.3", - "@stdlib/utils-keys": "^0.2.3", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.3" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "assert", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..a8a7310 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index fea45a5..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.strictEqual( keys.length > 0, true, 'has keys' ); - t.end(); -});